#[non_exhaustive]pub enum Dispatch {
Show 94 variants
ClientReady(Arc<Ready>),
ShardReady(Arc<Ready>),
ShardResume(Arc<ShardResume>),
ShardReconnecting(Arc<ShardReconnecting>),
Invalidated(Arc<Invalidated>),
ShardError(Arc<ReceiveError>),
ShardDisconnect(Arc<CloseCode>),
Raw(Arc<DispatchEvent>),
ApplicationCommandPermissionsUpdate(Arc<ApplicationCommandPermissionsUpdate>),
AutoModerationActionExecution(Arc<AutoModerationActionExecution>),
AutoModerationRuleCreate(Arc<AutoModerationRuleCreate>),
AutoModerationRuleUpdate(Arc<AutoModerationRuleUpdate>),
AutoModerationRuleDelete(Arc<AutoModerationRuleDelete>),
EntitlementCreate(Arc<EntitlementCreate>),
EntitlementUpdate(Arc<EntitlementUpdate>),
EntitlementDelete(Arc<EntitlementDelete>),
SubscriptionCreate(Arc<SubscriptionCreate>),
SubscriptionUpdate(Arc<SubscriptionUpdate>),
SubscriptionDelete(Arc<SubscriptionDelete>),
ChannelCreate(Arc<ChannelCreate>),
ChannelUpdate(Arc<ChannelUpdate>),
ChannelDelete(Arc<ChannelDelete>),
ChannelPinsUpdate(Arc<ChannelPinsUpdate>),
ChannelInfo(Arc<ChannelInfo>),
ThreadCreate(Arc<ThreadCreate>),
ThreadUpdate(Arc<ThreadUpdate>),
ThreadDelete(Arc<ThreadDelete>),
ThreadListSync(Arc<ThreadListSync>),
ThreadMemberUpdate(Arc<ThreadMemberUpdate>),
ThreadMembersUpdate(Arc<ThreadMembersUpdate>),
GuildCreate(Arc<GuildCreate>),
GuildAvailable(Arc<GuildCreate>),
GuildUpdate(Arc<GuildUpdate>),
GuildDelete(Arc<GuildDelete>),
GuildUnavailable(Arc<GuildUnavailable>),
GuildAuditLogEntryCreate(Arc<GuildAuditLogEntryCreate>),
GuildBanAdd(Arc<GuildBanAdd>),
GuildBanRemove(Arc<GuildBanRemove>),
GuildEmojisUpdate(Arc<GuildEmojisUpdate>),
GuildEmojiCreate(Arc<GuildEmojiCreate>),
GuildEmojiUpdate(Arc<GuildEmojiUpdate>),
GuildEmojiDelete(Arc<GuildEmojiDelete>),
GuildStickersUpdate(Arc<GuildStickersUpdate>),
GuildStickerCreate(Arc<GuildStickerCreate>),
GuildStickerUpdate(Arc<GuildStickerUpdate>),
GuildStickerDelete(Arc<GuildStickerDelete>),
GuildIntegrationsUpdate(Arc<GuildIntegrationsUpdate>),
IntegrationCreate(Arc<IntegrationCreate>),
IntegrationUpdate(Arc<IntegrationUpdate>),
IntegrationDelete(Arc<IntegrationDelete>),
GuildMemberAdd(Arc<GuildMemberAdd>),
GuildMemberUpdate(Arc<GuildMemberUpdate>),
GuildMemberRemove(Arc<GuildMemberRemove>),
GuildMembersChunk(Arc<GuildMembersChunk>),
GuildRoleCreate(Arc<GuildRoleCreate>),
GuildRoleUpdate(Arc<GuildRoleUpdate>),
GuildRoleDelete(Arc<GuildRoleDelete>),
GuildScheduledEventCreate(Arc<GuildScheduledEventCreate>),
GuildScheduledEventUpdate(Arc<GuildScheduledEventUpdate>),
GuildScheduledEventDelete(Arc<GuildScheduledEventDelete>),
GuildScheduledEventUserAdd(Arc<GuildScheduledEventUserAdd>),
GuildScheduledEventUserRemove(Arc<GuildScheduledEventUserRemove>),
GuildSoundboardSoundCreate(Arc<GuildSoundboardSoundCreate>),
GuildSoundboardSoundUpdate(Arc<GuildSoundboardSoundUpdate>),
GuildSoundboardSoundDelete(Arc<GuildSoundboardSoundDelete>),
GuildSoundboardSoundsUpdate(Arc<GuildSoundboardSoundsUpdate>),
SoundboardSounds(Arc<SoundboardSounds>),
StageInstanceCreate(Arc<StageInstanceCreate>),
StageInstanceUpdate(Arc<StageInstanceUpdate>),
StageInstanceDelete(Arc<StageInstanceDelete>),
InteractionCreate(Arc<InteractionCreate>),
InviteCreate(Arc<InviteCreate>),
InviteDelete(Arc<InviteDelete>),
MessageCreate(Arc<MessageCreate>),
MessageUpdate(Arc<MessageUpdate>),
MessageDelete(Arc<MessageDelete>),
MessageBulkDelete(Arc<MessageBulkDelete>),
MessageReactionAdd(Arc<MessageReactionAdd>),
MessageReactionRemove(Arc<MessageReactionRemove>),
MessageReactionRemoveAll(Arc<MessageReactionRemoveAll>),
MessageReactionRemoveEmoji(Arc<MessageReactionRemoveEmoji>),
MessagePollVoteAdd(Arc<MessagePollVoteAdd>),
MessagePollVoteRemove(Arc<MessagePollVoteRemove>),
TypingStart(Arc<TypingStart>),
PresenceUpdate(Arc<PresenceUpdate>),
UserUpdate(Arc<UserUpdate>),
VoiceStateUpdate(Arc<VoiceStateUpdate>),
VoiceServerUpdate(Arc<VoiceServerUpdate>),
VoiceChannelEffectSend(Arc<VoiceChannelEffectSend>),
VoiceChannelStatusUpdate(Arc<VoiceChannelStatusUpdate>),
VoiceChannelStartTimeUpdate(Arc<VoiceChannelStartTimeUpdate>),
WebhooksUpdate(Arc<WebhooksUpdate>),
RateLimited(Arc<RateLimited>),
Unknown(Arc<str>),
}Expand description
An event as delivered by Client::events: one variant per
event of Events, with the payload its handlers receive.
Raw is only delivered to handlers, never to event streams (they already receive
every event).
discord.js counterpart: none (one variant per member of Events).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClientReady(Arc<Ready>)
The ClientReady event.
ShardReady(Arc<Ready>)
The ShardReady event.
ShardResume(Arc<ShardResume>)
The ShardResume event.
ShardReconnecting(Arc<ShardReconnecting>)
The ShardReconnecting event.
Invalidated(Arc<Invalidated>)
The Invalidated event.
ShardError(Arc<ReceiveError>)
The ShardError event.
ShardDisconnect(Arc<CloseCode>)
The ShardDisconnect event.
Raw(Arc<DispatchEvent>)
The Raw event.
ApplicationCommandPermissionsUpdate(Arc<ApplicationCommandPermissionsUpdate>)
The ApplicationCommandPermissionsUpdate event.
AutoModerationActionExecution(Arc<AutoModerationActionExecution>)
The AutoModerationActionExecution event.
AutoModerationRuleCreate(Arc<AutoModerationRuleCreate>)
The AutoModerationRuleCreate event.
AutoModerationRuleUpdate(Arc<AutoModerationRuleUpdate>)
The AutoModerationRuleUpdate event.
AutoModerationRuleDelete(Arc<AutoModerationRuleDelete>)
The AutoModerationRuleDelete event.
EntitlementCreate(Arc<EntitlementCreate>)
The EntitlementCreate event.
EntitlementUpdate(Arc<EntitlementUpdate>)
The EntitlementUpdate event.
EntitlementDelete(Arc<EntitlementDelete>)
The EntitlementDelete event.
SubscriptionCreate(Arc<SubscriptionCreate>)
The SubscriptionCreate event.
SubscriptionUpdate(Arc<SubscriptionUpdate>)
The SubscriptionUpdate event.
SubscriptionDelete(Arc<SubscriptionDelete>)
The SubscriptionDelete event.
ChannelCreate(Arc<ChannelCreate>)
The ChannelCreate event.
ChannelUpdate(Arc<ChannelUpdate>)
The ChannelUpdate event.
ChannelDelete(Arc<ChannelDelete>)
The ChannelDelete event.
ChannelPinsUpdate(Arc<ChannelPinsUpdate>)
The ChannelPinsUpdate event.
ChannelInfo(Arc<ChannelInfo>)
The ChannelInfo event.
ThreadCreate(Arc<ThreadCreate>)
The ThreadCreate event.
ThreadUpdate(Arc<ThreadUpdate>)
The ThreadUpdate event.
ThreadDelete(Arc<ThreadDelete>)
The ThreadDelete event.
ThreadListSync(Arc<ThreadListSync>)
The ThreadListSync event.
ThreadMemberUpdate(Arc<ThreadMemberUpdate>)
The ThreadMemberUpdate event.
ThreadMembersUpdate(Arc<ThreadMembersUpdate>)
The ThreadMembersUpdate event.
GuildCreate(Arc<GuildCreate>)
The GuildCreate event.
GuildAvailable(Arc<GuildCreate>)
The GuildAvailable event.
GuildUpdate(Arc<GuildUpdate>)
The GuildUpdate event.
GuildDelete(Arc<GuildDelete>)
The GuildDelete event.
The GuildUnavailable event.
GuildAuditLogEntryCreate(Arc<GuildAuditLogEntryCreate>)
The GuildAuditLogEntryCreate event.
GuildBanAdd(Arc<GuildBanAdd>)
The GuildBanAdd event.
GuildBanRemove(Arc<GuildBanRemove>)
The GuildBanRemove event.
GuildEmojisUpdate(Arc<GuildEmojisUpdate>)
The GuildEmojisUpdate event.
GuildEmojiCreate(Arc<GuildEmojiCreate>)
The GuildEmojiCreate event.
GuildEmojiUpdate(Arc<GuildEmojiUpdate>)
The GuildEmojiUpdate event.
GuildEmojiDelete(Arc<GuildEmojiDelete>)
The GuildEmojiDelete event.
GuildStickersUpdate(Arc<GuildStickersUpdate>)
The GuildStickersUpdate event.
GuildStickerCreate(Arc<GuildStickerCreate>)
The GuildStickerCreate event.
GuildStickerUpdate(Arc<GuildStickerUpdate>)
The GuildStickerUpdate event.
GuildStickerDelete(Arc<GuildStickerDelete>)
The GuildStickerDelete event.
GuildIntegrationsUpdate(Arc<GuildIntegrationsUpdate>)
The GuildIntegrationsUpdate event.
IntegrationCreate(Arc<IntegrationCreate>)
The IntegrationCreate event.
IntegrationUpdate(Arc<IntegrationUpdate>)
The IntegrationUpdate event.
IntegrationDelete(Arc<IntegrationDelete>)
The IntegrationDelete event.
GuildMemberAdd(Arc<GuildMemberAdd>)
The GuildMemberAdd event.
GuildMemberUpdate(Arc<GuildMemberUpdate>)
The GuildMemberUpdate event.
GuildMemberRemove(Arc<GuildMemberRemove>)
The GuildMemberRemove event.
GuildMembersChunk(Arc<GuildMembersChunk>)
The GuildMembersChunk event.
GuildRoleCreate(Arc<GuildRoleCreate>)
The GuildRoleCreate event.
GuildRoleUpdate(Arc<GuildRoleUpdate>)
The GuildRoleUpdate event.
GuildRoleDelete(Arc<GuildRoleDelete>)
The GuildRoleDelete event.
GuildScheduledEventCreate(Arc<GuildScheduledEventCreate>)
The GuildScheduledEventCreate event.
GuildScheduledEventUpdate(Arc<GuildScheduledEventUpdate>)
The GuildScheduledEventUpdate event.
GuildScheduledEventDelete(Arc<GuildScheduledEventDelete>)
The GuildScheduledEventDelete event.
GuildScheduledEventUserAdd(Arc<GuildScheduledEventUserAdd>)
The GuildScheduledEventUserAdd event.
GuildScheduledEventUserRemove(Arc<GuildScheduledEventUserRemove>)
The GuildScheduledEventUserRemove event.
GuildSoundboardSoundCreate(Arc<GuildSoundboardSoundCreate>)
The GuildSoundboardSoundCreate event.
GuildSoundboardSoundUpdate(Arc<GuildSoundboardSoundUpdate>)
The GuildSoundboardSoundUpdate event.
GuildSoundboardSoundDelete(Arc<GuildSoundboardSoundDelete>)
The GuildSoundboardSoundDelete event.
GuildSoundboardSoundsUpdate(Arc<GuildSoundboardSoundsUpdate>)
The GuildSoundboardSoundsUpdate event.
SoundboardSounds(Arc<SoundboardSounds>)
The SoundboardSounds event.
StageInstanceCreate(Arc<StageInstanceCreate>)
The StageInstanceCreate event.
StageInstanceUpdate(Arc<StageInstanceUpdate>)
The StageInstanceUpdate event.
StageInstanceDelete(Arc<StageInstanceDelete>)
The StageInstanceDelete event.
InteractionCreate(Arc<InteractionCreate>)
The InteractionCreate event.
InviteCreate(Arc<InviteCreate>)
The InviteCreate event.
InviteDelete(Arc<InviteDelete>)
The InviteDelete event.
MessageCreate(Arc<MessageCreate>)
The MessageCreate event.
MessageUpdate(Arc<MessageUpdate>)
The MessageUpdate event.
MessageDelete(Arc<MessageDelete>)
The MessageDelete event.
MessageBulkDelete(Arc<MessageBulkDelete>)
The MessageBulkDelete event.
MessageReactionAdd(Arc<MessageReactionAdd>)
The MessageReactionAdd event.
MessageReactionRemove(Arc<MessageReactionRemove>)
The MessageReactionRemove event.
MessageReactionRemoveAll(Arc<MessageReactionRemoveAll>)
The MessageReactionRemoveAll event.
MessageReactionRemoveEmoji(Arc<MessageReactionRemoveEmoji>)
The MessageReactionRemoveEmoji event.
MessagePollVoteAdd(Arc<MessagePollVoteAdd>)
The MessagePollVoteAdd event.
MessagePollVoteRemove(Arc<MessagePollVoteRemove>)
The MessagePollVoteRemove event.
TypingStart(Arc<TypingStart>)
The TypingStart event.
PresenceUpdate(Arc<PresenceUpdate>)
The PresenceUpdate event.
UserUpdate(Arc<UserUpdate>)
The UserUpdate event.
VoiceStateUpdate(Arc<VoiceStateUpdate>)
The VoiceStateUpdate event.
VoiceServerUpdate(Arc<VoiceServerUpdate>)
The VoiceServerUpdate event.
VoiceChannelEffectSend(Arc<VoiceChannelEffectSend>)
The VoiceChannelEffectSend event.
VoiceChannelStatusUpdate(Arc<VoiceChannelStatusUpdate>)
The VoiceChannelStatusUpdate event.
VoiceChannelStartTimeUpdate(Arc<VoiceChannelStartTimeUpdate>)
The VoiceChannelStartTimeUpdate event.
WebhooksUpdate(Arc<WebhooksUpdate>)
The WebhooksUpdate event.
RateLimited(Arc<RateLimited>)
The RateLimited event.
Unknown(Arc<str>)
A gateway dispatch this version of the library does not know, with its name.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Dispatch
impl !UnwindSafe for Dispatch
impl Freeze for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnsafeUnpin for Dispatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more