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

pub struct CreateGroup(pub CommandGroup);

Used to create command groups

Examples

Create group named Information where all commands are prefixed with info, and add one command named "name". For example, if prefix is "~", we say "~info name" to call the "name" command.

framework.group("Information", |g| g
    .prefix("info")
    .command("name", |c| c
        .exec_str("Hakase")))

Methods

impl CreateGroup
[src]

[src]

Adds a command to group.

[src]

Adds a command to group with simplified API. You can return Err(From::from(string)) if there's an error.

[src]

If prefix is set, it will be required before all command names. For example, if bot prefix is "~" and group prefix is "image" we'd call a subcommand named "hibiki" by sending "~image hibiki".

Note: serenity automatically puts a space after group prefix.

Note: It's suggested to call this first when making a group.

[src]

Adds a ratelimit bucket.

[src]

Whether command can be used only privately or not.

[src]

Whether command can be used only in guilds or not.

[src]

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

[src]

Whether command can be used only privately or not.

[src]

The permissions that a user must have in the contextual channel in order for the command to be processed.

[src]

Sets roles that are allowed to use the command.

Trait Implementations

impl Default for CreateGroup
[src]

[src]

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