[][src]Trait serenity::prelude::EventHandler

pub trait EventHandler: Send + Sync {
#[must_use]    fn cache_ready<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guilds: Vec<GuildId>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn channel_create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _channel: &'life1 GuildChannel
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn category_create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _category: &'life1 ChannelCategory
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn category_delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _category: &'life1 ChannelCategory
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn private_channel_create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _channel: &'life1 PrivateChannel
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn channel_delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _channel: &'life1 GuildChannel
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn channel_pins_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _pin: ChannelPinsUpdateEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn channel_recipient_addition<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _group_id: ChannelId,
        _user: User
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn channel_recipient_removal<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _group_id: ChannelId,
        _user: User
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn channel_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _old: Option<Channel>,
        _new: Channel
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_ban_addition<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _banned_user: User
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_ban_removal<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _unbanned_user: User
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_create<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild: Guild,
        _is_new: bool
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_delete<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _incomplete: PartialGuild,
        _full: Option<Guild>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_emojis_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _current_state: HashMap<EmojiId, Emoji>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_integrations_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_member_addition<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _new_member: Member
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_member_removal<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _user: User,
        _member_data_if_available: Option<Member>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_member_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _old_if_available: Option<Member>,
        _new: Member
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_members_chunk<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _offline_members: HashMap<UserId, Member>,
        _nonce: Option<String>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_role_create<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _new: Role
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_role_delete<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _removed_role_id: RoleId,
        _removed_role_data_if_available: Option<Role>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_role_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _old_data_if_available: Option<Role>,
        _new: Role
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_unavailable<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn guild_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _old_data_if_available: Option<Guild>,
        _new_but_incomplete: PartialGuild
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn message<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _new_message: Message
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn message_delete<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _channel_id: ChannelId,
        _deleted_message_id: MessageId
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn message_delete_bulk<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _channel_id: ChannelId,
        _multiple_deleted_messages_ids: Vec<MessageId>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn message_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _old_if_available: Option<Message>,
        _new: Option<Message>,
        _event: MessageUpdateEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn reaction_add<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _add_reaction: Reaction
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn reaction_remove<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _removed_reaction: Reaction
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn reaction_remove_all<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _channel_id: ChannelId,
        _removed_from_message_id: MessageId
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn presence_replace<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        __arg2: Vec<Presence>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn presence_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _new_data: PresenceUpdateEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn ready<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _data_about_bot: Ready
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn resume<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        __arg2: ResumedEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn shard_stage_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        __arg2: ShardStageUpdateEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn typing_start<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        __arg2: TypingStartEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn unknown<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _name: String,
        _raw: Value
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn user_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _old_data: CurrentUser,
        _new: CurrentUser
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn voice_server_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        __arg2: VoiceServerUpdateEvent
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] 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>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn webhook_update<'life0, 'async_trait>(
        &'life0 self,
        _ctx: Context,
        _guild_id: GuildId,
        _belongs_to_channel_id: ChannelId
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

The core trait for handling events by serenity.

Provided methods

#[must_use]fn cache_ready<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guilds: Vec<GuildId>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when the cache has received and inserted all data from guilds.

This process happens upon starting your bot and should be fairly quick. However, cache actions performed prior this event may fail as the data could be not inserted yet.

Provides the cached guilds' ids.

#[must_use]fn channel_create<'life0, 'life1, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _channel: &'life1 GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Dispatched when a channel is created.

Provides said channel's data.

#[must_use]fn category_create<'life0, 'life1, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _category: &'life1 ChannelCategory
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Dispatched when a category is created.

Provides said category's data.

#[must_use]fn category_delete<'life0, 'life1, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _category: &'life1 ChannelCategory
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Dispatched when a category is deleted.

Provides said category's data.

#[must_use]fn private_channel_create<'life0, 'life1, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _channel: &'life1 PrivateChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Dispatched when a private channel is created.

Provides said channel's data.

#[must_use]fn channel_delete<'life0, 'life1, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _channel: &'life1 GuildChannel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Dispatched when a channel is deleted.

Provides said channel's data.

#[must_use]fn channel_pins_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _pin: ChannelPinsUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a pin is added, deleted.

Provides said pin's data.

#[must_use]fn channel_recipient_addition<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _group_id: ChannelId,
    _user: User
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user is added to a Group.

Provides the group's id and the user's data.

#[must_use]fn channel_recipient_removal<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _group_id: ChannelId,
    _user: User
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user is removed to a Group.

Provides the group's id and the user's data.

#[must_use]fn channel_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _old: Option<Channel>,
    _new: Channel
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a channel is updated.

Provides the old channel data, and the new data.

#[must_use]fn guild_ban_addition<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _banned_user: User
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user is banned from a guild.

Provides the guild's id and the banned user's data.

#[must_use]fn guild_ban_removal<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _unbanned_user: User
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user's ban is lifted from a guild.

Provides the guild's id and the lifted user's data.

#[must_use]fn guild_create<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild: Guild,
    _is_new: bool
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a guild is created; or an existing guild's data is sent to us.

Provides the guild's data and whether the guild is new.

#[must_use]fn guild_delete<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _incomplete: PartialGuild,
    _full: Option<Guild>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a guild is deleted.

Provides the partial data of the guild sent by discord, and the full data from the cache, if available.

#[must_use]fn guild_emojis_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _current_state: HashMap<EmojiId, Emoji>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when the emojis are updated.

Provides the guild's id and the new state of the emojis in the guild.

#[must_use]fn guild_integrations_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a guild's integration is added, updated or removed.

Provides the guild's id.

#[must_use]fn guild_member_addition<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _new_member: Member
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user joins a guild.

Provides the guild's id and the user's member data.

#[must_use]fn guild_member_removal<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _user: User,
    _member_data_if_available: Option<Member>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user's membership ends by leaving, getting kicked, or being banned.

Provides the guild's id, the user's data, and the user's member data if available.

#[must_use]fn guild_member_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _old_if_available: Option<Member>,
    _new: Member
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a member is updated (e.g their nickname is updated).

Provides the member's old data (if available) and the new data.

#[must_use]fn guild_members_chunk<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _offline_members: HashMap<UserId, Member>,
    _nonce: Option<String>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when the data for offline members was requested.

Provides the guild's id and the data.

#[must_use]fn guild_role_create<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _new: Role
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a role is created.

Provides the guild's id and the new role's data.

#[must_use]fn guild_role_delete<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _removed_role_id: RoleId,
    _removed_role_data_if_available: Option<Role>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a role is deleted.

Provides the guild's id, the role's id and its data if available.

#[must_use]fn guild_role_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _old_data_if_available: Option<Role>,
    _new: Role
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a role is updated.

Provides the guild's id, the role's old (if available) and new data.

#[must_use]fn guild_unavailable<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a guild became unavailable.

Provides the guild's id.

#[must_use]fn guild_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _old_data_if_available: Option<Guild>,
    _new_but_incomplete: PartialGuild
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when the guild is updated.

Provides the guild's old full data (if available) and the new, albeit partial data.

#[must_use]fn message<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _new_message: Message
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a message is created.

Provides the message's data.

#[must_use]fn message_delete<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _channel_id: ChannelId,
    _deleted_message_id: MessageId
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a message is deleted.

Provides the channel's id and the message's id.

#[must_use]fn message_delete_bulk<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _channel_id: ChannelId,
    _multiple_deleted_messages_ids: Vec<MessageId>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when multiple messages were deleted at once.

Provides the channel's id and the deleted messages' ids.

#[must_use]fn message_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _old_if_available: Option<Message>,
    _new: Option<Message>,
    _event: MessageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a message is updated.

Provides the old message if available, the new message as an option in case of cache inconsistencies, and the raw MessageUpdateEvent as a fallback.

#[must_use]fn reaction_add<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _add_reaction: Reaction
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a new reaction is attached to a message.

Provides the reaction's data.

#[must_use]fn reaction_remove<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _removed_reaction: Reaction
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a reaction is detached from a message.

Provides the reaction's data.

#[must_use]fn reaction_remove_all<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _channel_id: ChannelId,
    _removed_from_message_id: MessageId
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when all reactions of a message are detached from a message.

Provides the channel's id and the message's id.

#[must_use]fn presence_replace<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    __arg2: Vec<Presence>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn presence_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _new_data: PresenceUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user's presence is updated (e.g off -> on).

Provides the presence's new data.

#[must_use]fn ready<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _data_about_bot: Ready
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched upon startup.

Provides data about the bot and the guilds it's in.

#[must_use]fn resume<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    __arg2: ResumedEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched upon reconnection.

#[must_use]fn shard_stage_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    __arg2: ShardStageUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a shard's connection stage is updated

Provides the context of the shard and the event information about the update.

#[must_use]fn typing_start<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    __arg2: TypingStartEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user starts typing.

#[must_use]fn unknown<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _name: String,
    _raw: Value
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when an unknown event was sent from discord.

Provides the event's name and its unparsed data.

#[must_use]fn user_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _old_data: CurrentUser,
    _new: CurrentUser
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when the bot's data is updated.

Provides the old and new data.

#[must_use]fn voice_server_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    __arg2: VoiceServerUpdateEvent
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a guild's voice server was updated (or changed to another one).

Provides the voice server's data.

#[must_use]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>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a user joins, leaves or moves to a voice channel.

Provides the guild's id (if available) and the old and the new state of the guild's voice channels.

#[must_use]fn webhook_update<'life0, 'async_trait>(
    &'life0 self,
    _ctx: Context,
    _guild_id: GuildId,
    _belongs_to_channel_id: ChannelId
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Dispatched when a guild's webhook is updated.

Provides the guild's id and the channel's id the webhook belongs in.

Loading content...

Implementors

Loading content...