Skip to content

Commit dfae65d

Browse files
authored
Merge pull request #331 from chweesee/patch-1
Making docs link to application-commands instead of slash-commands
2 parents b4d0599 + 9e55b1f commit dfae65d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

discord_slash/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def __init__(self, *args, **kwargs):
447447

448448
class SlashCommandOptionType(IntEnum):
449449
"""
450-
Equivalent of `ApplicationCommandOptionType <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptiontype>`_ in the Discord API.
450+
Equivalent of `ApplicationCommandOptionType <https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type>`_ in the Discord API.
451451
"""
452452

453453
SUB_COMMAND = 1
@@ -667,7 +667,7 @@ def __eq__(self, other):
667667

668668
class SlashCommandPermissionType(IntEnum):
669669
"""
670-
Equivalent of `ApplicationCommandPermissionType <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissiontype>`_ in the Discord API.
670+
Equivalent of `ApplicationCommandPermissionType <https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type>`_ in the Discord API.
671671
"""
672672

673673
ROLE = 1

discord_slash/utils/manage_commands.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async def get_all_guild_commands_permissions(bot_id, bot_token, guild_id):
131131
:param bot_id: User ID of the bot.
132132
:param bot_token: Token of the bot.
133133
:param guild_id: ID of the guild to get permissions.
134-
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#get-application-command-permissions>.
134+
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions>.
135135
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
136136
"""
137137
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/permissions"
@@ -154,7 +154,7 @@ async def get_guild_command_permissions(bot_id, bot_token, guild_id, command_id)
154154
:param bot_token: Token of the bot.
155155
:param guild_id: ID of the guild to update permissions on.
156156
:param command_id: ID for the command to update permissions on.
157-
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#edit-application-command-permissions>
157+
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions>
158158
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
159159
"""
160160
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/{command_id}/permissions"
@@ -178,7 +178,7 @@ async def update_single_command_permissions(bot_id, bot_token, guild_id, command
178178
:param guild_id: ID of the guild to update permissions on.
179179
:param command_id: ID for the command to update permissions on.
180180
:param permissions: List of permissions for the command.
181-
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#edit-application-command-permissions>
181+
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions>
182182
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
183183
"""
184184
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/{command_id}/permissions"
@@ -205,7 +205,7 @@ async def update_guild_commands_permissions(bot_id, bot_token, guild_id, cmd_per
205205
:param bot_token: Token of the bot.
206206
:param guild_id: ID of the guild to update permissions.
207207
:param cmd_permissions: List of dict with permissions for each commands.
208-
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#batch-edit-application-command-permissions>.
208+
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions>.
209209
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
210210
"""
211211
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/permissions"
@@ -246,7 +246,7 @@ def create_option(
246246
You must set the the relevant argument's function to a default argument, eg ``argname = None``.
247247
248248
.. note::
249-
``choices`` must either be a list of `option type dicts <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice>`_
249+
``choices`` must either be a list of `option type dicts <https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure>`_
250250
or a list of single string values.
251251
"""
252252
if not isinstance(option_type, int) or isinstance(

docs/gettingstarted.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ As a side-note, as of version 3.0, message/menu commands (context menus) are han
445445
.. _components: components.html
446446
.. _errors: discord_slash.error.html
447447
.. _listeners: events.html
448-
.. _ApplicationCommandOptionType: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptiontype
449-
.. _ApplicationCommandOptionChoice: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice
450-
.. _ApplicationCommandOption: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoption
451-
.. _ApplicationCommandPermissionType: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissions
448+
.. _ApplicationCommandOptionType: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
449+
.. _ApplicationCommandOptionChoice: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
450+
.. _ApplicationCommandOption: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
451+
.. _ApplicationCommandPermissionType: https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
452452
.. _ApplicationCommandType: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types

0 commit comments

Comments
 (0)