pub struct HelpCommandBuilder<'a> { /* private fields */ }Expand description
A builder for a HelpCommand.
Implementations§
Source§impl<'a> HelpCommandBuilder<'a>
impl<'a> HelpCommandBuilder<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Make a new HelpCommandBuilder.
Sourcepub fn description(&mut self, description: &'a str) -> &mut Self
pub fn description(&mut self, description: &'a str) -> &mut Self
The help command description
Sourcepub fn argument(&mut self, argument: ArgumentParam) -> &mut Self
pub fn argument(&mut self, argument: ArgumentParam) -> &mut Self
Add an argument
Sourcepub fn on_process<F, A>(
&mut self,
on_process: fn(Context, CommandInteraction, Arc<HashMap<Box<str>, Command>>, A) -> F,
) -> &mut Self
pub fn on_process<F, A>( &mut self, on_process: fn(Context, CommandInteraction, Arc<HashMap<Box<str>, Command>>, A) -> F, ) -> &mut Self
The on_process hook
Sourcepub fn build(&mut self) -> Result<HelpCommand, BuilderError>
pub fn build(&mut self) -> Result<HelpCommand, BuilderError>
Build the HelpCommand
Trait Implementations§
Source§impl Debug for HelpCommandBuilder<'_>
impl Debug for HelpCommandBuilder<'_>
Auto Trait Implementations§
impl<'a> Freeze for HelpCommandBuilder<'a>
impl<'a> !RefUnwindSafe for HelpCommandBuilder<'a>
impl<'a> Send for HelpCommandBuilder<'a>
impl<'a> Sync for HelpCommandBuilder<'a>
impl<'a> Unpin for HelpCommandBuilder<'a>
impl<'a> !UnwindSafe for HelpCommandBuilder<'a>
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