diff --git a/discord_slash/model.py b/discord_slash/model.py index e5504747c..79cbd446e 100644 --- a/discord_slash/model.py +++ b/discord_slash/model.py @@ -447,7 +447,7 @@ def __init__(self, *args, **kwargs): class SlashCommandOptionType(IntEnum): """ - Equivalent of `ApplicationCommandOptionType `_ in the Discord API. + Equivalent of `ApplicationCommandOptionType `_ in the Discord API. """ SUB_COMMAND = 1 @@ -667,7 +667,7 @@ def __eq__(self, other): class SlashCommandPermissionType(IntEnum): """ - Equivalent of `ApplicationCommandPermissionType `_ in the Discord API. + Equivalent of `ApplicationCommandPermissionType `_ in the Discord API. """ ROLE = 1 diff --git a/discord_slash/utils/manage_commands.py b/discord_slash/utils/manage_commands.py index 642beec81..0e99b501c 100644 --- a/discord_slash/utils/manage_commands.py +++ b/discord_slash/utils/manage_commands.py @@ -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 . + :return: JSON Response of the request. A list of . :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" @@ -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 + :return: JSON Response of the request. A list of :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" @@ -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 + :return: JSON Response of the request. A list of :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" @@ -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 . + :return: JSON Response of the request. A list of . :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" @@ -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 `_ + ``choices`` must either be a list of `option type dicts `_ or a list of single string values. """ if not isinstance(option_type, int) or isinstance( diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst index 3b7881e55..1fa204ce1 100644 --- a/docs/gettingstarted.rst +++ b/docs/gettingstarted.rst @@ -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