Snek Lifecycle
You can override several methods to hook into command handler's lifecycle.
These methods start with Exec*
ExecOnMessageAsync
runs first right after any message was receivedExecInputTransformAsync
runs after ExecOnMessageAsync and allows you to transform the message content before the bot looks for the matching commandExecPreCommandAsync
runs after a command was found but not executed, allowing you to potentially prevent command executionExecPostCommandAsync
runs if the command was successfully executedExecOnNoCommandAsync
runs instead of ExecPostCommandAsync if no command was found for a message
Besides that, sneks have 2 methods with which you can initialize and cleanup your snek
InitializeAsync
Runs when the medusa which contains this snek is being loadedDisposeAsync
Runs when the medusa which contains this snek is being unloaded
Last updated