Enum DispatchError Copy item path Source #[non_exhaustive]
pub enum DispatchError {
Show 13 variants CheckFailed(&'static str , Reason ),
Ratelimited(RateLimitInfo ),
CommandDisabled,
BlockedUser,
BlockedGuild,
BlockedChannel,
OnlyForDM,
OnlyForGuilds,
OnlyForOwners,
LackingRole,
LackingPermissions(Permissions ),
NotEnoughArguments {
min: u16 ,
given: usize ,
},
TooManyArguments {
max: u16 ,
given: usize ,
},
}👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
Available on crate features framework and standard_framework only.
Expand description An enum representing all possible fail conditions under which a command won’t be executed.
This enum is marked as non-exhaustive Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When a custom function check has failed.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the command caller has exceeded a ratelimit bucket.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the requested command is disabled in bot configuration.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the user is blocked in bot configuration.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the guild or its owner is blocked in bot configuration.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the channel blocked in bot configuration.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the requested command can only be used in a direct message or group
channel.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the requested command can only be ran in guilds, or the bot doesn’t
support DMs.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the requested command can only be used by bot owners.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the requested command requires one role.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When the command requester lacks specific required permissions.
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When there are too few arguments.
Fields 👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
When there are too many arguments.
Fields 👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
👎 Deprecated: The standard framework is deprecated, and will be removed in 0.13. Please migrate to poise for command handling
Formats the value using the given formatter.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.