Struct telescope::discord_bot::event_handler::Handler [−][src]
pub struct Handler;
Expand description
ZST representing the event handler for telescope’s discord bot.
Trait Implementations
Dispatched when a guild is created; or an existing guild’s data is sent to us. Read more
Dispatched upon startup. Read more
fn interaction_create<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
interaction: Interaction
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn interaction_create<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
interaction: Interaction
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when an interaction is created (e.g a slash command was used or a button was clicked). Read more
Dispatched when the cache has received and inserted all data from guilds. Read more
fn channel_create<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_channel: &'life1 GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn channel_create<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_channel: &'life1 GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Dispatched when a channel is created. Read more
fn category_create<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_category: &'life1 ChannelCategory
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn category_create<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_category: &'life1 ChannelCategory
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Dispatched when a category is created. Read more
fn category_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_category: &'life1 ChannelCategory
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn category_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_category: &'life1 ChannelCategory
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Dispatched when a category is deleted. Read more
fn channel_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_channel: &'life1 GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn channel_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Context,
_channel: &'life1 GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Dispatched when a channel is deleted. Read more
fn channel_pins_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_pin: ChannelPinsUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn channel_pins_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_pin: ChannelPinsUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a pin is added, deleted. Read more
Dispatched when a channel is updated. Read more
Dispatched when a user is banned from a guild. Read more
Dispatched when a user’s ban is lifted from a guild. Read more
Dispatched when a guild is deleted. Read more
Dispatched when the emojis are updated. Read more
Dispatched when a guild’s integration is added, updated or removed. Read more
Dispatched when a user joins a guild. Read more
Dispatched when a user’s membership ends by leaving, getting kicked, or being banned. Read more
Dispatched when a member is updated (e.g their nickname is updated). Read more
fn guild_members_chunk<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_chunk: GuildMembersChunkEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn guild_members_chunk<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_chunk: GuildMembersChunkEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when the data for offline members was requested. Read more
Dispatched when a role is created. Read more
Dispatched when a role is deleted. Read more
Dispatched when a role is updated. Read more
Dispatched when a guild became unavailable. Read more
Dispatched when the guild is updated. Read more
fn invite_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_data: InviteCreateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn invite_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_data: InviteCreateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a invite is created. Read more
fn invite_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_data: InviteDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn invite_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_data: InviteDeleteEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a invite is deleted. Read more
Dispatched when a message is created. Read more
Dispatched when a message is deleted. Read more
Dispatched when multiple messages were deleted at once. Read more
Dispatched when a message is updated. Read more
Dispatched when a new reaction is attached to a message. Read more
Dispatched when a reaction is detached from a message. Read more
Dispatched when all reactions of a message are detached from a message. Read more
This event is legacy, and likely no longer sent by discord.
fn presence_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_new_data: PresenceUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn presence_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_new_data: PresenceUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a user’s presence is updated (e.g off -> on). Read more
Dispatched upon reconnection.
fn shard_stage_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: ShardStageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn shard_stage_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: ShardStageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a shard’s connection stage is updated Read more
fn typing_start<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: TypingStartEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn typing_start<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: TypingStartEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a user starts typing.
Dispatched when an unknown event was sent from discord. Read more
fn user_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_old_data: CurrentUser,
_new: CurrentUser
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn user_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_old_data: CurrentUser,
_new: CurrentUser
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when the bot’s data is updated. Read more
fn voice_server_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: VoiceServerUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn voice_server_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: VoiceServerUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a guild’s voice server was updated (or changed to another one). Read more
fn voice_state_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: Option<GuildId>,
_old: Option<VoiceState>,
_new: VoiceState
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn voice_state_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
__arg2: Option<GuildId>,
_old: Option<VoiceState>,
_new: VoiceState
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a user joins, leaves or moves to a voice channel. Read more
Dispatched when a guild’s webhook is updated. Read more
fn integration_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn integration_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a guild integration is created. Read more
fn integration_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn integration_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a guild integration is updated. Read more
fn integration_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration_id: IntegrationId,
_guild_id: GuildId,
_application_id: Option<ApplicationId>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn integration_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration_id: IntegrationId,
_guild_id: GuildId,
_application_id: Option<ApplicationId>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a guild integration is deleted. Read more
fn application_command_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn application_command_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
bots do no receive this event
Dispatched when an application command is created. Read more
fn application_command_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn application_command_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
bots do no receive this event
Dispatched when an application command is updated. Read more
fn application_command_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn application_command_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
bots do no receive this event
Dispatched when an application command is deleted. Read more
fn stage_instance_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_stage_instance: StageInstance
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn stage_instance_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_stage_instance: StageInstance
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a stage instance is created. Read more
fn stage_instance_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_stage_instance: StageInstance
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn stage_instance_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_stage_instance: StageInstance
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a stage instance is updated. Read more
fn stage_instance_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_stage_instance: StageInstance
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn stage_instance_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_stage_instance: StageInstance
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a stage instance is deleted. Read more
fn thread_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread: GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn thread_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread: GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a thread is created or the current user is added to a private thread. Read more
fn thread_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread: GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn thread_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread: GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a thread is updated. Read more
fn thread_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread: PartialGuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn thread_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread: PartialGuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when a thread is deleted. Read more
fn thread_list_sync<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread_list_sync: ThreadListSyncEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn thread_list_sync<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread_list_sync: ThreadListSyncEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when the current user gains access to a channel Read more
fn thread_member_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread_member: ThreadMember
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn thread_member_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread_member: ThreadMember
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when the ThreadMember
for the current user is updated. Read more
fn thread_members_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread_members_update: ThreadMembersUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
fn thread_members_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_thread_members_update: ThreadMembersUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Dispatched when anyone is added to or removed from a thread. If the current user does not have the GatewayIntents::GUILDS
,
then this event will only be sent if the current user was added to or removed from the thread. Read more
Auto Trait Implementations
impl RefUnwindSafe for Handler
impl UnwindSafe for Handler
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more