Struct serenity::framework::standard::Command [] [src]

pub struct Command {
    pub checks: Vec<Box<Fn(&mut Context, &Message, &mut Args, &Arc<Command>) -> bool + Send + Sync + 'static>>,
    pub exec: CommandType,
    pub bucket: Option<String>,
    pub desc: Option<String>,
    pub example: Option<String>,
    pub usage: Option<String>,
    pub min_args: Option<i32>,
    pub max_args: Option<i32>,
    pub required_permissions: Permissions,
    pub allowed_roles: Vec<String>,
    pub help_available: bool,
    pub dm_only: bool,
    pub guild_only: bool,
    pub owners_only: bool,
    // some fields omitted
}

Command struct used to store commands internally.

Fields

A set of checks to be called prior to executing the command. The checks will short-circuit on the first check that returns false.

Function called when the command is called.

Ratelimit bucket.

Command description, used by other commands.

Example arguments, used by other commands.

Command usage schema, used by other commands.

Minumum amount of arguments that should be passed.

Maximum amount of arguments that can be passed.

Permissions required to use this command.

Roles allowed to use this command.

Whether command should be displayed in help list or not, used by other commands.

Whether command can be used only privately or not.

Whether command can be used only in guilds or not.

Whether command can only be used by owners or not.

Methods

impl Command
[src]

[src]

Trait Implementations

impl Default for Command
[src]

[src]

Returns the "default value" for a type. Read more