Trait ruvolt::EventHandler
source · [−]pub trait EventHandler: Send + Sync + 'static {
Show 21 methods
fn error<'life0, 'async_trait>(
&'life0 self,
_error: Error
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn ready<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ReadyEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn message<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: Message
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn message_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: MessageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn message_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: MessageDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_create<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: Channel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_group_join<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelGroupJoinEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_group_leave<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelGroupLeaveEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_start_typing<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelStartTypingEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_stop_typing<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelStopTypingEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn channel_ack<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelAckEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_member_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_member_join<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberJoinEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_member_leave<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberLeaveEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_role_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerRoleUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn server_role_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerRoleDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn user_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: UserUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}Expand description
Define handlers for supported events.
Provided methods
An error has occurred.
Bot is ready.
A new message received.
fn message_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: MessageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn message_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: MessageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A message has been edited or otherwise updated.
fn message_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: MessageDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn message_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: MessageDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A message has been deleted.
A channel has been created.
fn channel_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A channel details were updated.
fn channel_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A channel has been deleted.
fn channel_group_join<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelGroupJoinEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_group_join<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelGroupJoinEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has joined the group.
fn channel_group_leave<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelGroupLeaveEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_group_leave<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelGroupLeaveEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has left the group.
fn channel_start_typing<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelStartTypingEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_start_typing<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelStartTypingEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has started typing in a channel.
fn channel_stop_typing<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelStopTypingEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_stop_typing<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelStopTypingEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has stopped typing in a channel.
fn channel_ack<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelAckEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_ack<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ChannelAckEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
You have acknowledged new messages in the channel up to the message id.
fn server_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A server details were updated.
fn server_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A server has been deleted.
fn server_member_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_member_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A server member details were updated.
fn server_member_join<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberJoinEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_member_join<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberJoinEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has joined the group.
fn server_member_leave<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberLeaveEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_member_leave<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerMemberLeaveEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has left the group.
fn server_role_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerRoleUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_role_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerRoleUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A server role details were updated.
fn server_role_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerRoleDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn server_role_delete<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: ServerRoleDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A server role has been deleted.
fn user_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: UserUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn user_update<'life0, 'async_trait>(
&'life0 self,
_cx: Context,
_data: UserUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
A user has been updated.