discord_slash.error module
- exception discord_slash.error.SlashCommandError
Bases:
Exception
All exceptions of this extension can be captured with this.
Note
discord.py doesn’t trigger on_command_error event. Use this extension’s on_slash_command_error.
- exception discord_slash.error.RequestFailure(status: int, msg: str)
Bases:
discord_slash.error.SlashCommandError
Request to Discord API has failed.
Note
Since release
1.0.8
, this is only used atutils.manage_commands
.http.SlashCommandRequest
uses exception from discord.py such asdiscord.HTTPException
.- Variables
status – Status code of failed response.
msg – Message of failed response.
- exception discord_slash.error.IncorrectFormat
Bases:
discord_slash.error.SlashCommandError
Some formats are incorrect. See Discord API DOCS for proper format.
- exception discord_slash.error.DuplicateCommand(name: str)
Bases:
discord_slash.error.SlashCommandError
There is a duplicate command name.
- exception discord_slash.error.DuplicateSlashClient
Bases:
discord_slash.error.SlashCommandError
There are duplicate
SlashCommand
instances.
- exception discord_slash.error.CheckFailure
Bases:
discord_slash.error.SlashCommandError
Command check has failed.
- exception discord_slash.error.IncorrectType
Bases:
discord_slash.error.SlashCommandError
Type passed was incorrect
- exception discord_slash.error.IncorrectCommandData
Bases:
discord_slash.error.SlashCommandError
Incorrect data was passed to a slash command data object
- exception discord_slash.error.AlreadyResponded
Bases:
discord_slash.error.SlashCommandError
The interaction was already responded to