Exceptions¶
The following sections outline the exceptions that can be generated by using any of the methods in the API.
Exception Hierarchy¶
Objects¶
The following exceptions are thrown by the library.
- exception discord_tools.MaxUsagesReached(command, limit, *args)[source]¶
An exception raised when a command has reached its maximum usages.
- command¶
The context that raised the error.
- exception discord_tools.NotInValidGuild(command, guild, *args)[source]¶
An exception raised when a command has been invoked in a non-allowed guild.
- command¶
The command that raised the error.
- guild¶
The guild in which this command was invoked in.
- Type:
- exception discord_tools.MissingAnyPermissions(missing_permissions, *args)[source]¶
An exception raised when the command invoker lacks any permissions to run a command.
- exception discord_tools.MissingAttachments(count, minimum, *args)[source]¶
An exception raised when the invoker message does not have enough attachments to run a command.
- exception discord_tools.NoVoiceState(author, context, *args)[source]¶
An exception raised when the command invoker has no voice state (is not connected in a voice channel).
- author¶
The author that did not have a voice state.
- Type:
- context¶
The context that failed.
- exception discord_tools.StringDoesNotMatch(converter, argument, *args)[source]¶
An exception raised when the
RegexConverterfails to find an occurrence in a string.Added in version 1.0.
- pattern¶
The pattern that was searched for.
- Type: