Canary Lifecycle¶
You can override several methods to hook into command handler's lifecycle.
These methods start with Exec*
ExecOnMessageAsyncruns first right after any message was receivedExecInputTransformAsyncruns after ExecOnMessageAsync and allows you to transform the message content before the bot looks for the matching commandExecPreCommandAsyncruns after a command was found but not executed, allowing you to potentially prevent command executionExecPostCommandAsyncruns if the command was successfully executedExecOnNoCommandAsyncruns instead of ExecPostCommandAsync if no command was found for a message
Besides that, canaries have 2 methods with which you can initialize and cleanup your canary
InitializeAsyncRuns when the marmalade which contains this canary is being loadedDisposeAsyncRuns when the marmalade which contains this canary is being unloaded