Exceptions

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.

Type:

discord.ext.commands.Command

Parameters:
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.

Type:

discord.ext.commands.Command

guild

The guild in which this command was invoked in.

Type:

discord.Guild

Parameters:
exception discord_tools.MissingAnyPermissions(missing_permissions, *args)[source]

An exception raised when the command invoker lacks any permissions to run a command.

missing_permissions

The permissions that the invoker is missing.

Type:

List[str]

Parameters:
exception discord_tools.MissingAttachments(count, minimum, *args)[source]

An exception raised when the invoker message does not have enough attachments to run a command.

attachment_count

The amount of attachments the message has.

Type:

int

attachment_minimum

The minimum amount of attachments the message must have.

Type:

int

Parameters:
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:

discord.Member

context

The context that failed.

Type:

discord.ext.commands.Context

Parameters: