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

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.

This example is not tested
framework.group("Information", |g| g
    .prefix("info")
    .command("name", |c| c
        .exec_str("Hakase")))

Methods

impl CreateGroup
[src]

Adds a command to group.

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

Like on, but accepts a Command directly.

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.

Sets prefixes to respond to. Each can be a string slice of any non-zero length.

Note: serenity automatically puts a space after group prefix.

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

Adds a ratelimit bucket.

Whether command can be used only privately or not.

Whether command can be used only in guilds or not.

Whether owners shall bypass buckets, missing permissions, wrong channels, missing roles, and checks.

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

Whether command can be used only privately or not.

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

Sets roles that are allowed to use the command.

Adds a "check" to a group, which checks whether or not the groups's commands should be called.

Note: These checks are bypassed for commands sent by the application owner.

Adds a command for a group that will be executed if no command-name has been passed.

Sets a description for the group that will be displayed if only one specific group is requested via help.

Trait Implementations

impl Default for CreateGroup
[src]

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

Auto Trait Implementations

impl Send for CreateGroup

impl Sync for CreateGroup

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any