Skip to main content

HelpCommand

Trait HelpCommand 

Source
pub trait HelpCommand<E: From<Error> + Clone + Debug + Send + Sync + 'static, S: Debug + Clone + Send + Sync + 'static>:
    Debug
    + Send
    + Sync {
    // Required methods
    fn create_global_help<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        commands: Vec<Command<E, S>>,
        builder: &'life1 mut SendMessageBuilder,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_command_help<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        command: Command<E, S>,
        builder: &'life1 mut SendMessageBuilder,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_group_help<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        command: Command<E, S>,
        builder: &'life1 mut SendMessageBuilder,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn no_command_found<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        name: String,
        builder: &'life1 mut SendMessageBuilder,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn filter_commands<'life0, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        commands: Vec<Command<E, S>>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Command<E, S>>, E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn send_help_command<'life0, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        builder: SendMessageBuilder,
    ) -> Pin<Box<dyn Future<Output = Result<Message, E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn after_help_command<'life0, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_channel<'life0, 'async_trait>(
        &'life0 self,
        context: Context<E, S>,
    ) -> Pin<Box<dyn Future<Output = Result<String, E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn create_global_help<'life0, 'life1, 'async_trait>( &'life0 self, context: Context<E, S>, commands: Vec<Command<E, S>>, builder: &'life1 mut SendMessageBuilder, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_command_help<'life0, 'life1, 'async_trait>( &'life0 self, context: Context<E, S>, command: Command<E, S>, builder: &'life1 mut SendMessageBuilder, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_group_help<'life0, 'life1, 'async_trait>( &'life0 self, context: Context<E, S>, command: Command<E, S>, builder: &'life1 mut SendMessageBuilder, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn no_command_found<'life0, 'life1, 'async_trait>( &'life0 self, context: Context<E, S>, name: String, builder: &'life1 mut SendMessageBuilder, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn filter_commands<'life0, 'async_trait>( &'life0 self, context: Context<E, S>, commands: Vec<Command<E, S>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Command<E, S>>, E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_help_command<'life0, 'async_trait>( &'life0 self, context: Context<E, S>, builder: SendMessageBuilder, ) -> Pin<Box<dyn Future<Output = Result<Message, E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn after_help_command<'life0, 'async_trait>( &'life0 self, context: Context<E, S>, message: Message, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_channel<'life0, 'async_trait>( &'life0 self, context: Context<E, S>, ) -> Pin<Box<dyn Future<Output = Result<String, E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<E: From<Error> + Clone + Debug + Send + Sync + 'static, S: Debug + Clone + Send + Sync + 'static> HelpCommand<E, S> for DefaultHelpCommand