Parsley is an addon for the
discordgo Discord client library for Go, adding an automatic command parser & dispatch system.
Bot authors can write commands for their Parsley-powered bots by implementing a handler function, taking two arguments - the
MessageCreate event from
discordgo, and an arbitrary struct of their own choosing.
Parsley will then, on receipt of a message with a matching command, perform reflection on the provided handler and automatically populate the struct via the user’s provided arguments, calling the handler with the resulting value.