File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Submodules
55----------
66
77.. toctree ::
8- :maxdepth: 2
8+ :maxdepth: 4
99
1010 discord_slash.client
1111 discord_slash.error
Original file line number Diff line number Diff line change 1+ discord-py-slash-command Events
2+ ================================
3+ This page is about events of this extension.
4+ These events can be registered to discord.py's listener or
5+ ``event `` decorator.
6+
7+ .. function :: on_slash_command(ctx)
8+
9+ Called when slash command is triggered.
10+
11+ :param ctx: SlashContext of the triggered command.
12+ :type ctx: :class: `.model.SlashContext `
13+
14+ .. function :: on_slash_command_error(ctx, ex)
15+
16+ Called when slash command had an exception while the command was invoked.
17+
18+ :param ctx: SlashContext of the triggered command.
19+ :type ctx: :class: `.model.SlashContext `
20+ :param ex: Exception that raised.
21+ :type ex: Exception
22+
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Example:
3535 :caption: Contents:
3636
3737 discord_slash.rst
38+ events.rst
3839 discord_slash.utils.rst
3940
4041
You can’t perform that action at this time.
0 commit comments