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
Copy file name to clipboardExpand all lines: docs/faq.rst
+5-13Lines changed: 5 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,11 @@ If you want your commands automatically registered, set ``sync_commands`` to ``T
27
27
28
28
from discord_slash import SlashCommand
29
29
30
-
slash = SlashCommand(client, auto_register=True)
30
+
slash = SlashCommand(client, sync_commands=True)
31
31
32
32
Or, if you prefer to have more control, you can use :mod:`.utils.manage_commands`.
33
33
34
-
Or, you can made requests directly to Discord API, read the `docs <https://discord.com/developers/docs/interactions/slash-commands#registering-a-command>`_.
34
+
Or, you can make requests directly to Discord API, read the `docs <https://discord.com/developers/docs/interactions/slash-commands#registering-a-command>`_.
35
35
36
36
Add the command to your bot
37
37
---------------------------
@@ -44,17 +44,9 @@ For normal slash command, use :meth:`.client.SlashCommand.slash`, and for subcom
44
44
How to delete slash commands?
45
45
*****************************
46
46
47
-
You can enable auto deletion of unused commands by setting ``auto_delete`` to ``True`` at :class:`.client.SlashCommand`.
47
+
If ``sync_commands`` is set to ``True``, commands will automatically be removed as needed.
48
48
49
-
.. code-block:: python
50
-
51
-
from discord_slash import SlashCommand
52
-
slash = SlashCommand(auto_delete=True)
53
-
54
-
.. note::
55
-
This will make a request for **every** single guild your bot is in.
56
-
57
-
Or you can do it manually by this methods:
49
+
However, if you are not using ``sync_commands`` you can do it manually by this methods:
58
50
59
51
* Deleting a single command with :meth:`utils.manage_commands.remove_slash_command`
60
52
* Deleting all commands using :meth:`utils.manage_commands.remove_all_commands`
@@ -124,4 +116,4 @@ Pretty much anything from the discord's commands extension doesn't work, also so
124
116
125
117
Any more questions?
126
118
*******************
127
-
Join the `discord server <https://discord.gg/KkgMBVuEkx>`_ and ask in ``#questions``!
119
+
Join the `discord server <https://discord.gg/KkgMBVuEkx>`_ and ask in ``#questions``!
0 commit comments