Errores¶
bostie.errors
¶
BostieError
¶
Bases: Exception
Base of errors about Discord, the network and the bot's state.
A bad argument raises ValueError or TypeError instead.
StateError
¶
Bases: BostieError, RuntimeError
The object is not in a state that allows the call.
MissingIntent
¶
Bases: BostieError, ValueError
A feature needs an intent the bot did not ask for.
MemberRequestRateLimited
¶
MemberRequestRateLimited(retry_after: float)
StartupError
¶
Bases: BostieError, OSError
bostie could not set up a system resource it needs.
TransportError
¶
Bases: BostieError
A request failed before Discord answered it.
InvalidToken
¶
Bases: BostieError
Discord rejected the bot token.
RequestBudgetExhausted
¶
Bases: BostieError
bostie refused a request because too many recent requests were invalid.
HTTPException
¶
Bases: BostieError
A request ended with an error status; its text lists each field's errors.
BadRequest
¶
Bases: HTTPException
Discord answered 400 Bad Request.
Forbidden
¶
Bases: HTTPException
Discord answered 403 Forbidden.
NotFound
¶
Bases: HTTPException
Discord answered 404 Not Found.
RateLimited
¶
RateLimited(status: int, code: int, message: str, errors: dict[str, Any], body: bytes, *, retry_after: float | None, is_global: bool)
Bases: HTTPException
Discord answered 429, or bostie held the request back unsent.
bostie holds it back when the route stays limited for longer than it waits.
ServerError
¶
Bases: HTTPException
Discord answered with a 5xx status.
UnexpectedResponse
¶
Bases: BostieError
Discord accepted a request, but its answer does not decode; see raw.
GatewayClosed
¶
Bases: BostieError
Discord closed the gateway connection and bostie will not reconnect.
PrivilegedIntentsRequired
¶
Bases: GatewayClosed
The bot asked for a privileged intent that is not enabled for it.
ShardingRequired
¶
Bases: GatewayClosed
The bot is in too many guilds to run on a single shard.
ShardNotRunning
¶
Bases: StateError
The shard does not run in this process, or has stopped.
GatewayQueueFull
¶
Bases: BostieError
The shard has too many gateway commands waiting to be sent.
CommandError
¶
Bases: BostieError
Base class of errors about application commands and interactions.
CommandDefinitionError
¶
Bases: CommandError, TypeError
A command, group or option is defined in a way Discord does not accept.
SyncProblem
dataclass
¶
CommandSyncError
¶
CommandSyncError(problems: Iterable[SyncProblem])
Bases: CommandError
Discord rejected the commands sent during a sync, one line per problem.
OptionConversionError
¶
Bases: CommandError
An option value could not be converted to its annotated type.
InteractionResponded
¶
Bases: CommandError
The interaction is not in a state that allows this response.
InteractionNotAnswered
¶
Bases: CommandError
The interaction needs an answer or a defer before this call.
InteractionExpired
¶
Bases: CommandError
The interaction can no longer be answered.
It is over 15 minutes old, or Discord already rejected or forgot its token.
MissingPermissions
¶
MissingPermissions(missing: Permissions)
BotMissingPermissions
¶
BotMissingPermissions(missing: Permissions)
MissingRole
¶
CooldownActive
¶
CooldownActive(retry_after: float)
MaxConcurrencyReached
¶
MaxConcurrencyReached(number: int)
VoiceError
¶
Bases: BostieError
Base class of voice errors.
VoiceConnectError
¶
VoiceConnectError(reason: DisconnectReason, code: int | None, detail: str)
Bases: VoiceError
A voice connection ended before it was ready.
NotInVoice
¶
Bases: VoiceError
The user is not in a voice channel of this guild.
VoiceNotConnected
¶
Bases: VoiceError
The voice connection has ended.
AlreadyConnected
¶
Bases: VoiceError, StateError
bostie already runs a voice connection in this guild.
VoiceQueueFull
¶
Bases: VoiceError
The voice connection has too many commands waiting.
DaveError
¶
Bases: VoiceError
A DAVE end-to-end encryption step failed.
SinkClosed
¶
Bases: VoiceError
The sink is closed.
BufferFull
¶
Bases: VoiceError
The sink has no room for this write.
Empty
¶
Bases: VoiceError
Nothing is queued in the receiver.
ReceiverClosed
¶
Bases: VoiceError
The receiver ended and has nothing left to read.