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

pub trait Command: Send + Sync + 'static {
    fn execute(
        &self,
        _: &mut Context,
        _: &Message,
        _: Args
    ) -> Result<(), Error>; fn options(&self) -> Arc<CommandOptions> { ... }
fn init(&self) { ... }
fn before(&self, &mut Context, &Message) -> bool { ... }
fn after(&self, &mut Context, &Message, &Result<(), Error>) { ... } }

A framework command.

Required Methods

Provided Methods

Called when the command gets registered.

"before" middleware. Is called alongside the global middleware in the framework.

"after" middleware. Is called alongside the global middleware in the framework.

Implementations on Foreign Types

impl Command for Arc<dyn Command>
[src]

Implementors

impl<F: ?Sized> Command for F where
    F: Fn(&mut Context, &Message, Args) -> Result<(), Error> + Send + Sync + 'static, 
[src]