Struct pikadick_slash_framework::Command
source · pub struct Command { /* private fields */ }
Expand description
A slash framework command
Implementations§
source§impl Command
impl Command
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Get the command description
sourcepub fn arguments(&self) -> &[ArgumentParam]
pub fn arguments(&self) -> &[ArgumentParam]
Get the command arguments
sourcepub async fn fire_on_process(
&self,
ctx: Context,
interaction: CommandInteraction
) -> Result<(), BoxError>
pub async fn fire_on_process( &self, ctx: Context, interaction: CommandInteraction ) -> Result<(), BoxError>
Fire the on_process hook
sourcepub fn register(&self, command: CreateCommand) -> CreateCommand
pub fn register(&self, command: CreateCommand) -> CreateCommand
Register this command
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl !UnwindSafe for Command
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more