Enum serenity::framework::standard::DispatchError
[−]
[src]
pub enum DispatchError {
CheckFailed(Arc<Command>),
CommandDisabled(String),
BlockedUser,
BlockedGuild,
LackOfPermissions(Permissions),
RateLimited(i64),
OnlyForDM,
OnlyForGuilds,
OnlyForOwners,
LackingRole,
NotEnoughArguments {
min: i32,
given: usize,
},
TooManyArguments {
max: i32,
given: usize,
},
IgnoredBot,
WebhookAuthor,
}A enum representing all possible fail conditions under which a command won't be executed.
Variants
CheckFailed(Arc<Command>)When a custom function check has failed.
CommandDisabled(String)When the requested command is disabled in bot configuration.
BlockedUserWhen the user is blocked in bot configuration.
BlockedGuildWhen the guild or its owner is blocked in bot configuration.
LackOfPermissions(Permissions)When the command requester lacks specific required permissions.
RateLimited(i64)When the command requester has exceeded a ratelimit bucket. The attached value is the time a requester has to wait to run the command again.
OnlyForDMWhen the requested command can only be used in a direct message or group channel.
OnlyForGuildsWhen the requested command can only be ran in guilds, or the bot doesn't support DMs.
OnlyForOwnersWhen the requested command can only be used by bot owners.
LackingRoleWhen the requested command requires one role.
NotEnoughArgumentsWhen there are too few arguments.
Fields of NotEnoughArguments
min: i32 | |
given: usize |
TooManyArgumentsWhen there are too many arguments.
Fields of TooManyArguments
max: i32 | |
given: usize |
IgnoredBotWhen the command was requested by a bot user when they are set to be ignored.
WebhookAuthorWhen the bot ignores webhooks and a command was issued by one.