Skip to content

Commit e8bbb31

Browse files
committed
Fixed FAQ fits to new release
1 parent a9c6aa3 commit e8bbb31

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

docs/faq.rst

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,17 @@ ctx.send
7171
--------
7272
This sends a message or response of the slash command via the interaction response or interaction webhook.
7373

74-
These are available by this:
74+
These are only available by this:
7575

7676
1. Show command triggering message. (a.k.a. ACK)
7777
2. Hide the response so only message author can see.
7878

79-
However, a few things are not supported:
80-
81-
1. Sending files.
82-
2. Getting sent message as :class:`discord.Message`, so you can't add reactions, etc.
83-
3. ``delete_after``, etc.
84-
4. Unable to use after 15 mins from the invocation.
79+
However, you are unable to use after 15 mins from the invocation.
8580

8681
ctx.channel.send
8782
----------------
8883
``ctx.channel`` is the :class:`discord.TextChannel` object for the channel that the slash command was used in.
8984
``send()`` is the sending coroutine in discord.py. (:meth:`discord.TextChannel.send`)
90-
This means that you can send files , add reactions, get the message, etc.
9185

9286
.. warning::
9387
* If the bot is not in the guild, but slash commands are, ``ctx.channel`` will be ``None`` and this won't work.
@@ -98,23 +92,15 @@ These are not supported compared to ``ctx.send``:
9892
1. Showing command triggering message.
9993
2. Hiding the response so only message author can see.
10094

101-
You can use them both together, just be aware of permissions. Try this:
102-
103-
.. code-block:: python
104-
105-
await ctx.send(5) # Show command usage but don't send message
106-
msg = await ctx.channel.send(...) # Send message with the channel object
95+
You can use them both together, just be aware of permissions.
10796

10897
Can I use something of discord.py's in this extension?
10998
******************************************************
11099
Most things work, but a few that are listed below don't.
111100

112101
Checks
113102
------
114-
discord.py check decorators won't work due to the context of this extension being different from discord.py's.
115-
116-
Examples: ``@commands.check()``, ``@commands.has_permissions()``, ``@commands.guild_only()``
117-
103+
discord.py check decorators can work, but its not 100% guaranteed every checks will work.
118104

119105
Events
120106
------
@@ -123,27 +109,19 @@ This extension triggers some events, check the `events docs <https://discord-py-
123109

124110
Converters
125111
----------
126-
Use ``options=[...]`` or ``auto_convert=[...]`` on the slash command / subcommand decorator instead.
112+
Use ``options=[...]`` on the slash command / subcommand decorator instead.
127113

128114
Note:
129115
Pretty much anything from the discord's commands extension doesn't work, also some bot things.
130116

131117
.. warning::
132118
If you use something that might take a while, eg ``wait_for`` you'll run into two issues:
133119

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.
135121
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.
136122

137123
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.
138124

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-
147125
Any more questions?
148126
*******************
149127
Join the `discord server <https://discord.gg/KkgMBVuEkx>`_ and ask in ``#questions``!

0 commit comments

Comments
 (0)