#[non_exhaustive]pub enum Event<'a> {
Show 73 variants
Ready(Box<ReadyEventData<'a>>),
Resumed,
GuildCreate(Box<Guild<'a>>),
GuildUpdate(Box<Guild<'a>>),
GuildDelete(UnavailableGuild),
GuildBanAdd(Box<GuildBanEvent<'a>>),
GuildBanRemove(Box<GuildBanEvent<'a>>),
GuildEmojisUpdate(Box<GuildEmojisUpdateEvent<'a>>),
GuildStickersUpdate(Box<GuildStickersUpdateEvent<'a>>),
GuildIntegrationsUpdate(Box<GuildIntegrationsUpdateEvent>),
GuildAuditLogEntryCreate(Box<AuditLogEntry>),
GuildMemberAdd(Box<GuildMemberAddEvent<'a>>),
GuildMemberRemove(Box<GuildMemberRemoveEvent<'a>>),
GuildMemberUpdate(Box<GuildMemberUpdateEvent<'a>>),
GuildMembersChunk(Box<GuildMembersChunkEvent<'a>>),
GuildRoleCreate(Box<GuildRoleEvent<'a>>),
GuildRoleUpdate(Box<GuildRoleEvent<'a>>),
GuildRoleDelete(Box<GuildRoleDeleteEvent>),
ChannelCreate(Box<Channel<'a>>),
ChannelUpdate(Box<Channel<'a>>),
ChannelDelete(Box<Channel<'a>>),
ChannelPinsUpdate(Box<ChannelPinsUpdateEvent>),
ThreadCreate(Box<Channel<'a>>),
ThreadUpdate(Box<Channel<'a>>),
ThreadDelete(Box<ThreadDeleteEvent>),
ThreadListSync(Box<ThreadListSyncEvent<'a>>),
ThreadMemberUpdate(Box<ThreadMemberUpdateEvent<'a>>),
ThreadMembersUpdate(Box<ThreadMembersUpdateEvent<'a>>),
MessageCreate(Box<Message<'a>>),
MessageUpdate(Box<MessageUpdateEvent<'a>>),
MessageDelete(MessageDeleteEvent),
MessageDeleteBulk(MessageDeleteBulkEvent),
MessageReactionAdd(Box<MessageReactionAddEvent<'a>>),
MessageReactionRemove(Box<MessageReactionRemoveEvent<'a>>),
MessageReactionRemoveAll(Box<MessageReactionRemoveAllEvent>),
MessageReactionRemoveEmoji(Box<MessageReactionRemoveEmojiEvent<'a>>),
InteractionCreate(Box<Interaction<'a>>),
InviteCreate(Box<InviteCreateEvent<'a>>),
InviteDelete(Box<InviteDeleteEvent<'a>>),
StageInstanceCreate(Box<StageInstance>),
StageInstanceUpdate(Box<StageInstance>),
StageInstanceDelete(Box<StageInstance>),
GuildScheduledEventCreate(Box<ScheduledEvent<'a>>),
GuildScheduledEventUpdate(Box<ScheduledEvent<'a>>),
GuildScheduledEventDelete(Box<ScheduledEvent<'a>>),
GuildScheduledEventUserAdd(Box<ScheduledEventUserEvent>),
GuildScheduledEventUserRemove(Box<ScheduledEventUserEvent>),
AutoModerationRuleCreate(Box<AutoModRule>),
AutoModerationRuleUpdate(Box<AutoModRule>),
AutoModerationRuleDelete(Box<AutoModRule>),
AutoModerationActionExecution(Box<AutoModActionExecution>),
IntegrationCreate(Box<Integration<'a>>),
IntegrationUpdate(Box<Integration<'a>>),
IntegrationDelete(Box<IntegrationDeleteEvent>),
WebhooksUpdate(Box<WebhooksUpdateEvent>),
EntitlementCreate(Box<Entitlement>),
EntitlementUpdate(Box<Entitlement>),
EntitlementDelete(Box<Entitlement>),
SubscriptionCreate(Box<Subscription>),
SubscriptionUpdate(Box<Subscription>),
SubscriptionDelete(Box<Subscription>),
SoundboardSoundCreate(Box<SoundboardSound<'a>>),
SoundboardSoundUpdate(Box<SoundboardSound<'a>>),
SoundboardSoundDelete(Box<SoundboardSoundDeleteEvent>),
SoundboardSoundsUpdate(Box<SoundboardSoundsUpdateEvent<'a>>),
GuildSoundboardSoundsUpdate(Box<GuildSoundboardSoundsUpdateEvent<'a>>),
TypingStart(Box<TypingStartEvent<'a>>),
PresenceUpdate(Box<PresenceUpdateEvent>),
UserUpdate(Box<User<'a>>),
VoiceStateUpdate(Box<VoiceStateUpdateEvent<'a>>),
VoiceServerUpdate(VoiceServerUpdateEvent),
VoiceChannelEffectSend(Box<VoiceChannelEffectSendEvent<'a>>),
Unknown {
name: String,
data: Value,
},
}Expand description
Parsed Gateway event ready for handler dispatch.
Events are parsed from Dispatch payloads (opcode 0). Each variant corresponds to a Discord Gateway event type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ready(Box<ReadyEventData<'a>>)
Received after successful Identify.
Resumed
Received after successful Resume.
GuildCreate(Box<Guild<'a>>)
Lazy-load for unavailable guild, or guild joined.
GuildUpdate(Box<Guild<'a>>)
Guild was updated.
GuildDelete(UnavailableGuild)
Guild was deleted or became unavailable.
GuildBanAdd(Box<GuildBanEvent<'a>>)
User was banned from guild.
GuildBanRemove(Box<GuildBanEvent<'a>>)
User was unbanned from guild.
GuildEmojisUpdate(Box<GuildEmojisUpdateEvent<'a>>)
Guild emojis were updated.
GuildStickersUpdate(Box<GuildStickersUpdateEvent<'a>>)
Guild stickers were updated.
GuildIntegrationsUpdate(Box<GuildIntegrationsUpdateEvent>)
Guild integrations were updated.
GuildAuditLogEntryCreate(Box<AuditLogEntry>)
Audit log entry was created.
GuildMemberAdd(Box<GuildMemberAddEvent<'a>>)
New member joined guild.
GuildMemberRemove(Box<GuildMemberRemoveEvent<'a>>)
Member was removed from guild.
GuildMemberUpdate(Box<GuildMemberUpdateEvent<'a>>)
Member was updated.
GuildMembersChunk(Box<GuildMembersChunkEvent<'a>>)
Response to Request Guild Members.
GuildRoleCreate(Box<GuildRoleEvent<'a>>)
Role was created.
GuildRoleUpdate(Box<GuildRoleEvent<'a>>)
Role was updated.
GuildRoleDelete(Box<GuildRoleDeleteEvent>)
Role was deleted.
ChannelCreate(Box<Channel<'a>>)
Channel was created.
ChannelUpdate(Box<Channel<'a>>)
Channel was updated.
ChannelDelete(Box<Channel<'a>>)
Channel was deleted.
ChannelPinsUpdate(Box<ChannelPinsUpdateEvent>)
Message was pinned/unpinned.
ThreadCreate(Box<Channel<'a>>)
Thread was created.
ThreadUpdate(Box<Channel<'a>>)
Thread was updated.
ThreadDelete(Box<ThreadDeleteEvent>)
Thread was deleted.
ThreadListSync(Box<ThreadListSyncEvent<'a>>)
Sent when gaining access to a channel with threads.
ThreadMemberUpdate(Box<ThreadMemberUpdateEvent<'a>>)
Current user’s thread member was updated.
ThreadMembersUpdate(Box<ThreadMembersUpdateEvent<'a>>)
Users were added/removed from a thread.
MessageCreate(Box<Message<'a>>)
Message was created.
MessageUpdate(Box<MessageUpdateEvent<'a>>)
Message was updated.
MessageDelete(MessageDeleteEvent)
Message was deleted.
MessageDeleteBulk(MessageDeleteBulkEvent)
Multiple messages were deleted (bulk).
MessageReactionAdd(Box<MessageReactionAddEvent<'a>>)
Reaction was added to a message.
MessageReactionRemove(Box<MessageReactionRemoveEvent<'a>>)
Reaction was removed from a message.
MessageReactionRemoveAll(Box<MessageReactionRemoveAllEvent>)
All reactions were removed from a message.
MessageReactionRemoveEmoji(Box<MessageReactionRemoveEmojiEvent<'a>>)
All reactions for an emoji were removed.
InteractionCreate(Box<Interaction<'a>>)
An interaction was created (slash command, button, modal, etc.).
InviteCreate(Box<InviteCreateEvent<'a>>)
Invite was created.
InviteDelete(Box<InviteDeleteEvent<'a>>)
Invite was deleted.
StageInstanceCreate(Box<StageInstance>)
Stage instance was created.
StageInstanceUpdate(Box<StageInstance>)
Stage instance was updated.
StageInstanceDelete(Box<StageInstance>)
Stage instance was deleted.
GuildScheduledEventCreate(Box<ScheduledEvent<'a>>)
Scheduled event was created.
GuildScheduledEventUpdate(Box<ScheduledEvent<'a>>)
Scheduled event was updated.
GuildScheduledEventDelete(Box<ScheduledEvent<'a>>)
Scheduled event was deleted.
GuildScheduledEventUserAdd(Box<ScheduledEventUserEvent>)
User subscribed to scheduled event.
GuildScheduledEventUserRemove(Box<ScheduledEventUserEvent>)
User unsubscribed from scheduled event.
AutoModerationRuleCreate(Box<AutoModRule>)
AutoMod rule was created.
AutoModerationRuleUpdate(Box<AutoModRule>)
AutoMod rule was updated.
AutoModerationRuleDelete(Box<AutoModRule>)
AutoMod rule was deleted.
AutoModerationActionExecution(Box<AutoModActionExecution>)
AutoMod action was executed.
IntegrationCreate(Box<Integration<'a>>)
Integration was created.
IntegrationUpdate(Box<Integration<'a>>)
Integration was updated.
IntegrationDelete(Box<IntegrationDeleteEvent>)
Integration was deleted.
WebhooksUpdate(Box<WebhooksUpdateEvent>)
Webhooks were updated in a channel.
EntitlementCreate(Box<Entitlement>)
Entitlement was created.
EntitlementUpdate(Box<Entitlement>)
Entitlement was updated.
EntitlementDelete(Box<Entitlement>)
Entitlement was deleted.
SubscriptionCreate(Box<Subscription>)
Subscription was created.
SubscriptionUpdate(Box<Subscription>)
Subscription was updated.
SubscriptionDelete(Box<Subscription>)
Subscription was deleted.
SoundboardSoundCreate(Box<SoundboardSound<'a>>)
Soundboard sound was created in a guild.
SoundboardSoundUpdate(Box<SoundboardSound<'a>>)
Soundboard sound was updated in a guild.
SoundboardSoundDelete(Box<SoundboardSoundDeleteEvent>)
Soundboard sound was deleted in a guild.
SoundboardSoundsUpdate(Box<SoundboardSoundsUpdateEvent<'a>>)
Multiple soundboard sounds were updated.
GuildSoundboardSoundsUpdate(Box<GuildSoundboardSoundsUpdateEvent<'a>>)
Guild soundboard sounds were updated.
TypingStart(Box<TypingStartEvent<'a>>)
User started typing.
PresenceUpdate(Box<PresenceUpdateEvent>)
User’s presence was updated.
UserUpdate(Box<User<'a>>)
Current user was updated.
VoiceStateUpdate(Box<VoiceStateUpdateEvent<'a>>)
Voice state was updated.
VoiceServerUpdate(VoiceServerUpdateEvent)
Voice server information received.
VoiceChannelEffectSend(Box<VoiceChannelEffectSendEvent<'a>>)
Voice channel effect was sent.
Unknown
Unknown event type - contains raw JSON for custom handling.