You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
discord.py check decorators can work, but its not 100% guaranteed every checks will work.
118
104
119
105
Events
120
106
------
@@ -123,27 +109,19 @@ This extension triggers some events, check the `events docs <https://discord-py-
123
109
124
110
Converters
125
111
----------
126
-
Use ``options=[...]`` or ``auto_convert=[...]`` on the slash command / subcommand decorator instead.
112
+
Use ``options=[...]`` on the slash command / subcommand decorator instead.
127
113
128
114
Note:
129
115
Pretty much anything from the discord's commands extension doesn't work, also some bot things.
130
116
131
117
.. warning::
132
118
If you use something that might take a while, eg ``wait_for`` you'll run into two issues:
133
119
134
-
1. If you don't respond within 3 seconds (``ctx.send()``) discord invalidates the interaction.
120
+
1. If you don't respond within 3 seconds (``ctx.response()``) discord invalidates the interaction.
135
121
2. The interaction only lasts for 15 minutes, so if you try and send something with the interaction (``ctx.send``) more than 15 mins after the command was ran it won't work.
136
122
137
123
As an alternative you can use ``ctx.channel.send`` but this relies on the the bot being in the guild, and the bot having send perms in that channel.
138
124
139
-
Why isn't [something] in SlashContext?
140
-
**************************************
141
-
Simple answer is this: The way discord handles slash commands means that the slash command handler has to be different to discord.py's command handler.
142
-
143
-
One example is ``ctx.message``:
144
-
``message`` is not available because the slash command usage sending is dependant on what send_type you respond with on ``ctx.send``, so discord doesn't supply the message when sending the interaction.
145
-
Others things are also missing due to similar reasons.
146
-
147
125
Any more questions?
148
126
*******************
149
127
Join the `discord server <https://discord.gg/KkgMBVuEkx>`_ and ask in ``#questions``!
0 commit comments