Exceptions¶
Payloads¶
- class twitchio.ext.commands.CommandErrorPayload(*, context: Context, exception: CommandError)¶
Payload received in the
event_command_error()
event.- exception¶
The exception raised during command invocation.
Exceptions¶
- exception twitchio.ext.commands.CommandError¶
Base exception for command related errors.
All commands.ext related exceptions inherit from this class.
- exception twitchio.ext.commands.ComponentLoadError¶
Exception raised when a
commands.Component
fails to load.
- exception twitchio.ext.commands.CommandInvokeError(msg: str | None = None, original: Exception | None = None)¶
Exception raised when an error occurs during invocation of a command.
- exception twitchio.ext.commands.CommandHookError(msg: str | None = None, original: Exception | None = None)¶
- exception twitchio.ext.commands.CommandNotFound¶
Exception raised when a message is processed with a valid prefix and no
Command
could be found.
- exception twitchio.ext.commands.CommandExistsError¶
Exception raised when you try to add a command or alias to a command that is already registered on the
Bot
.
- exception twitchio.ext.commands.PrefixError¶
Exception raised when invalid prefix or prefix callable is passed.
- exception twitchio.ext.commands.InputError¶
Base exception for errors raised while parsing the input for command invocation. All
ArgumentError
and child exception inherit from this class.
- exception twitchio.ext.commands.ArgumentError¶
Base exception for errors raised while parsing arguments in commands.
- exception twitchio.ext.commands.ConversionError¶
Base exception for conversion errors which occur during argument parsing in commands.
- exception twitchio.ext.commands.BadArgument(msg: str, *, name: str | None = None, value: str | None)¶
Exception raised when a parsing or conversion failure is encountered on an argument to pass into a command.
- exception twitchio.ext.commands.MissingRequiredArgument(param: Parameter)¶
Exception raised when parsing a command and a parameter that is required is not encountered.
- exception twitchio.ext.commands.GuardFailure(msg: str | None = None, *, guard: Any | None = None)¶
Exception raised when a
guard()
fails or blocks a command from executing.This exception should be subclassed when raising a custom exception for a
guard()
.
- exception twitchio.ext.commands.CommandOnCooldown(msg: str | None = None, *, cooldown: BaseCooldown, remaining: float)¶
Exception raised when a command is invoked while on cooldown/ratelimited.
- cooldown¶
The specific cooldown instance used that raised this error.
- Type
- exception twitchio.ext.commands.ModuleLoadFailure(name: str, exc: Exception)¶
Exception raised when a module failed to load during execution or setup entry point.
- exception twitchio.ext.commands.ModuleAlreadyLoadedError(msg: str)¶
Exception raised when a module has already been loaded.
- exception twitchio.ext.commands.ModuleNotLoadedError(msg: str)¶
Exception raised when a module was not loaded.
- exception twitchio.ext.commands.NoEntryPointError(msg: str)¶
Exception raised when the module does not have a setup entry point coroutine.