Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions discord_slash/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def __init__(self, *args, **kwargs):

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

SUB_COMMAND = 1
Expand Down Expand Up @@ -667,7 +667,7 @@ def __eq__(self, other):

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

ROLE = 1
Expand Down
10 changes: 5 additions & 5 deletions discord_slash/utils/manage_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def get_all_guild_commands_permissions(bot_id, bot_token, guild_id):
:param bot_id: User ID of the bot.
:param bot_token: Token of the bot.
:param guild_id: ID of the guild to get permissions.
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#get-application-command-permissions>.
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions>.
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
"""
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/permissions"
Expand All @@ -154,7 +154,7 @@ async def get_guild_command_permissions(bot_id, bot_token, guild_id, command_id)
:param bot_token: Token of the bot.
:param guild_id: ID of the guild to update permissions on.
:param command_id: ID for the command to update permissions on.
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#edit-application-command-permissions>
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions>
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
"""
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/{command_id}/permissions"
Expand All @@ -178,7 +178,7 @@ async def update_single_command_permissions(bot_id, bot_token, guild_id, command
:param guild_id: ID of the guild to update permissions on.
:param command_id: ID for the command to update permissions on.
:param permissions: List of permissions for the command.
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#edit-application-command-permissions>
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions>
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
"""
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/{command_id}/permissions"
Expand All @@ -205,7 +205,7 @@ async def update_guild_commands_permissions(bot_id, bot_token, guild_id, cmd_per
:param bot_token: Token of the bot.
:param guild_id: ID of the guild to update permissions.
:param cmd_permissions: List of dict with permissions for each commands.
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/slash-commands#batch-edit-application-command-permissions>.
:return: JSON Response of the request. A list of <https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions>.
:raises: :class:`.error.RequestFailure` - Requesting to Discord API has failed.
"""
url = f"https://discord.com/api/v8/applications/{bot_id}/guilds/{guild_id}/commands/permissions"
Expand Down Expand Up @@ -246,7 +246,7 @@ def create_option(
You must set the the relevant argument's function to a default argument, eg ``argname = None``.

.. note::
``choices`` must either be a list of `option type dicts <https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice>`_
``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>`_
or a list of single string values.
"""
if not isinstance(option_type, int) or isinstance(
Expand Down
8 changes: 4 additions & 4 deletions docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ As a side-note, as of version 3.0, message/menu commands (context menus) are han
.. _components: components.html
.. _errors: discord_slash.error.html
.. _listeners: events.html
.. _ApplicationCommandOptionType: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptiontype
.. _ApplicationCommandOptionChoice: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptionchoice
.. _ApplicationCommandOption: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoption
.. _ApplicationCommandPermissionType: https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissions
.. _ApplicationCommandOptionType: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
.. _ApplicationCommandOptionChoice: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
.. _ApplicationCommandOption: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
.. _ApplicationCommandPermissionType: https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
.. _ApplicationCommandType: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types