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
5
5
----------
6
6
7
7
.. toctree ::
8
- :maxdepth: 2
8
+ :maxdepth: 4
9
9
10
10
discord_slash.client
11
11
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:
35
35
:caption: Contents:
36
36
37
37
discord_slash.rst
38
+ events.rst
38
39
discord_slash.utils.rst
39
40
40
41
You can’t perform that action at this time.
0 commit comments