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 Selfwhere
F: Future<Output = Result<(), BoxError>> + Send + 'static,
A: FromOptions + 'static,
pub fn on_process<F, A>( &mut self, on_process: fn(_: Context, _: CommandInteraction, _: Arc<HashMap<Box<str>, Command>>, _: A) -> F ) -> &mut Selfwhere F: Future<Output = Result<(), BoxError>> + Send + 'static, A: FromOptions + 'static,
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> !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