discord_slash Events¶
This page is about events of this extension.
These events can be registered to discord.py’s listener or
event
decorator.
- on_slash_command(ctx)¶
Called when slash command is triggered.
- Parameters
ctx (
model.SlashContext
) – SlashContext of the triggered command.
- on_slash_command_error(ctx, ex)¶
Called when slash command had an exception while the command was invoked.
- Parameters
ctx (
model.SlashContext
) – SlashContext of the triggered command.ex (Exception) – Exception that raised.
- on_component(ctx)¶
Called when a component is triggered.
- Parameters
ctx (
model.ComponentContext
) – ComponentContext of the triggered component.
- on_component_callback(ctx, callback)¶
Called when a component callback is triggered.
- Parameters
ctx (
model.ComponentContext
) – ComponentContext of the triggered component.callback (
model.ComponentCallbackObject
) – triggered ComponentCallbackObject