MessageComponentInteractionHandler

Trait MessageComponentInteractionHandler 

Source
pub trait MessageComponentInteractionHandler {
    // Required method
    fn invoke<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        ctx: &'life1 Context,
        interaction: &'life2 MessageComponentInteraction,
        original_message: &'life3 mut Message,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

This trait provides a function to receive and respond to message component interactions.

TODO: more docs around handler map context

Required Methods§

Source

fn invoke<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, ctx: &'life1 Context, interaction: &'life2 MessageComponentInteraction, original_message: &'life3 mut Message, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Handle the message component interaction

Implementors§