Trait serenity::framework::standard::Command [−][src]
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
fn options(&self) -> Arc<CommandOptions>
fn init(&self)
Called when the command gets registered.
fn before(&self, &mut Context, &Message) -> bool
"before" middleware. Is called alongside the global middleware in the framework.
fn after(&self, &mut Context, &Message, &Result<(), Error>)
"after" middleware. Is called alongside the global middleware in the framework.
Implementations on Foreign Types
impl Command for Arc<Command>
[src]
impl Command for Arc<Command>