Struct telescope::discord_bot::commands::Command [−][src]
struct Command {
name: &'static str,
builder: fn(_: &mut CreateApplicationCommand) -> &mut CreateApplicationCommand,
handler: for<'a> fn(_: &'a Context, _: &'a ApplicationCommandInteraction) -> BoxFuture<'a, Result<()>>,
}
Expand description
Telescope’s concept of a discord command. A builder function and a handler function.
Fields
name: &'static str
builder: fn(_: &mut CreateApplicationCommand) -> &mut CreateApplicationCommand
handler: for<'a> fn(_: &'a Context, _: &'a ApplicationCommandInteraction) -> BoxFuture<'a, Result<()>>
Auto Trait Implementations
impl RefUnwindSafe for Command
impl UnwindSafe for Command
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more