pub enum Event {
Show 75 variants
AutoModerationActionExecution(AutoModerationActionExecution),
AutoModerationRuleCreate(Box<AutoModerationRuleCreate>),
AutoModerationRuleDelete(Box<AutoModerationRuleDelete>),
AutoModerationRuleUpdate(Box<AutoModerationRuleUpdate>),
BanAdd(BanAdd),
BanRemove(BanRemove),
ChannelCreate(Box<ChannelCreate>),
ChannelDelete(Box<ChannelDelete>),
ChannelPinsUpdate(ChannelPinsUpdate),
ChannelUpdate(Box<ChannelUpdate>),
CommandPermissionsUpdate(CommandPermissionsUpdate),
GatewayHeartbeat(u64),
GatewayHeartbeatAck,
GatewayHello(u64),
GatewayInvalidateSession(bool),
GatewayReconnect,
GiftCodeUpdate,
GuildCreate(Box<GuildCreate>),
GuildDelete(GuildDelete),
GuildEmojisUpdate(GuildEmojisUpdate),
GuildIntegrationsUpdate(GuildIntegrationsUpdate),
GuildScheduledEventCreate(Box<GuildScheduledEventCreate>),
GuildScheduledEventDelete(Box<GuildScheduledEventDelete>),
GuildScheduledEventUpdate(Box<GuildScheduledEventUpdate>),
GuildScheduledEventUserAdd(GuildScheduledEventUserAdd),
GuildScheduledEventUserRemove(GuildScheduledEventUserRemove),
GuildStickersUpdate(GuildStickersUpdate),
GuildUpdate(Box<GuildUpdate>),
IntegrationCreate(Box<IntegrationCreate>),
IntegrationDelete(IntegrationDelete),
IntegrationUpdate(Box<IntegrationUpdate>),
InteractionCreate(Box<InteractionCreate>),
InviteCreate(Box<InviteCreate>),
InviteDelete(InviteDelete),
MemberAdd(Box<MemberAdd>),
MemberRemove(MemberRemove),
MemberUpdate(Box<MemberUpdate>),
MemberChunk(MemberChunk),
MessageCreate(Box<MessageCreate>),
MessageDelete(MessageDelete),
MessageDeleteBulk(MessageDeleteBulk),
MessageUpdate(Box<MessageUpdate>),
PresenceUpdate(Box<PresenceUpdate>),
PresencesReplace,
ReactionAdd(Box<ReactionAdd>),
ReactionRemove(Box<ReactionRemove>),
ReactionRemoveAll(ReactionRemoveAll),
ReactionRemoveEmoji(ReactionRemoveEmoji),
Ready(Box<Ready>),
Resumed,
RoleCreate(RoleCreate),
RoleDelete(RoleDelete),
RoleUpdate(RoleUpdate),
ShardConnected(Connected),
ShardConnecting(Connecting),
ShardDisconnected(Disconnected),
ShardIdentifying(Identifying),
ShardReconnecting(Reconnecting),
ShardPayload(Payload),
ShardResuming(Resuming),
StageInstanceCreate(StageInstanceCreate),
StageInstanceDelete(StageInstanceDelete),
StageInstanceUpdate(StageInstanceUpdate),
ThreadCreate(Box<ThreadCreate>),
ThreadDelete(ThreadDelete),
ThreadListSync(ThreadListSync),
ThreadMemberUpdate(Box<ThreadMemberUpdate>),
ThreadMembersUpdate(ThreadMembersUpdate),
ThreadUpdate(Box<ThreadUpdate>),
TypingStart(Box<TypingStart>),
UnavailableGuild(UnavailableGuild),
UserUpdate(UserUpdate),
VoiceServerUpdate(VoiceServerUpdate),
VoiceStateUpdate(Box<VoiceStateUpdate>),
WebhooksUpdate(WebhooksUpdate),
}Expand description
Any type of event that a shard emits.
This brings together all of the types of DispatchEvents,
GatewayEvents, and ShardEvents.
Variants
AutoModerationActionExecution(AutoModerationActionExecution)
Message was blocked by AutoMod according to a rule.
AutoModerationRuleCreate(Box<AutoModerationRuleCreate>)
Sent when an auto moderation rule is created.
AutoModerationRuleDelete(Box<AutoModerationRuleDelete>)
Sent when an auto moderation rule is deleted.
AutoModerationRuleUpdate(Box<AutoModerationRuleUpdate>)
Sent when an auto moderation rule is updated.
BanAdd(BanAdd)
A user was banned from a guild.
BanRemove(BanRemove)
A user’s ban from a guild was removed.
ChannelCreate(Box<ChannelCreate>)
A channel was created.
ChannelDelete(Box<ChannelDelete>)
A channel was deleted.
ChannelPinsUpdate(ChannelPinsUpdate)
A channel’s pins were updated.
ChannelUpdate(Box<ChannelUpdate>)
A channel was updated.
CommandPermissionsUpdate(CommandPermissionsUpdate)
A command’s permissions were updated.
GatewayHeartbeat(u64)
A heartbeat was sent to or received from the gateway.
GatewayHeartbeatAck
A heartbeat acknowledgement was received from the gateway.
GatewayHello(u64)
A “hello” packet was received from the gateway.
GatewayInvalidateSession(bool)
A shard’s session was invalidated.
true if resumable. If not, then the shard must do a full reconnect.
GatewayReconnect
The gateway is indicating to perform a reconnect.
GiftCodeUpdate
Undocumented event, should be ignored.
GuildCreate(Box<GuildCreate>)
A guild was created.
GuildDelete(GuildDelete)
A guild was deleted or the current user was removed from a guild.
GuildEmojisUpdate(GuildEmojisUpdate)
A guild’s emojis were updated.
GuildIntegrationsUpdate(GuildIntegrationsUpdate)
A guild’s integrations were updated.
GuildScheduledEventCreate(Box<GuildScheduledEventCreate>)
A guild scheduled event was created.
GuildScheduledEventDelete(Box<GuildScheduledEventDelete>)
A guild scheduled event was deleted.
GuildScheduledEventUpdate(Box<GuildScheduledEventUpdate>)
A guild scheduled event was updated.
GuildScheduledEventUserAdd(GuildScheduledEventUserAdd)
A user was added to a guild scheduled event.
GuildScheduledEventUserRemove(GuildScheduledEventUserRemove)
A user was removed from a guild scheduled event.
GuildStickersUpdate(GuildStickersUpdate)
A guild’s stickers were updated.
GuildUpdate(Box<GuildUpdate>)
A guild was updated.
IntegrationCreate(Box<IntegrationCreate>)
A guild integration was created.
IntegrationDelete(IntegrationDelete)
A guild integration was updated.
IntegrationUpdate(Box<IntegrationUpdate>)
A guild integration was deleted.
InteractionCreate(Box<InteractionCreate>)
An interaction was invoked by a user.
InviteCreate(Box<InviteCreate>)
A invite was made.
InviteDelete(InviteDelete)
A invite was deleted.
MemberAdd(Box<MemberAdd>)
A user was added to a guild.
MemberRemove(MemberRemove)
A user was removed from a guild.
MemberUpdate(Box<MemberUpdate>)
A user’s member object in a guild was updated.
MemberChunk(MemberChunk)
A chunk of members were received from the gateway.
MessageCreate(Box<MessageCreate>)
A message was created in a channel.
MessageDelete(MessageDelete)
A message was deleted in a channel.
MessageDeleteBulk(MessageDeleteBulk)
Multiple messages were deleted in a channel.
MessageUpdate(Box<MessageUpdate>)
A message was updated in a channel.
PresenceUpdate(Box<PresenceUpdate>)
A user’s active presence (such as game or online status) was updated.
PresencesReplace
Multiple presences outside of a guild were updated.
For bots this is always empty and useless.
ReactionAdd(Box<ReactionAdd>)
A reaction was added to a message.
ReactionRemove(Box<ReactionRemove>)
A reaction was removed from a message.
ReactionRemoveAll(ReactionRemoveAll)
All reactions were removed from a message.
ReactionRemoveEmoji(ReactionRemoveEmoji)
All instances of a given emoji from the reactions of a message were removed.
Ready(Box<Ready>)
A shard is now “ready” and fully connected.
Resumed
A shard has successfully resumed.
RoleCreate(RoleCreate)
A role was created in a guild.
RoleDelete(RoleDelete)
A role was deleted in a guild.
RoleUpdate(RoleUpdate)
A role was updated in a guild.
ShardConnected(Connected)
A shard is now in a connected stage after being fully connected to the gateway.
ShardConnecting(Connecting)
A shard is now in a connecting stage after starting to connect to the gateway.
ShardDisconnected(Disconnected)
A shard is now in a disconnected stage after the connection was closed.
ShardIdentifying(Identifying)
A shard is now in a identifying stage after starting a new session.
ShardReconnecting(Reconnecting)
A shard is now in a reconnecting stage after a disconnect or session was ended.
ShardPayload(Payload)
A payload of bytes came in through the shard’s connection.
ShardResuming(Resuming)
A shard is now in a Resuming stage after a disconnect.
StageInstanceCreate(StageInstanceCreate)
A stage instance was created in a stage channel.
StageInstanceDelete(StageInstanceDelete)
A stage instance was deleted in a stage channel.
StageInstanceUpdate(StageInstanceUpdate)
A stage instance was updated in a stage channel.
ThreadCreate(Box<ThreadCreate>)
A thread has been created, relevant to the current user, or the current user has been added to a thread.
ThreadDelete(ThreadDelete)
A thread, relevant to the current user, has been deleted.
ThreadListSync(ThreadListSync)
The current user has gained access to a thread.
ThreadMemberUpdate(Box<ThreadMemberUpdate>)
The thread member object for the current user has been updated.
ThreadMembersUpdate(ThreadMembersUpdate)
A user has been added to or removed from a thread.
ThreadUpdate(Box<ThreadUpdate>)
A thread has been updated.
TypingStart(Box<TypingStart>)
A user started typing in a channel.
UnavailableGuild(UnavailableGuild)
A guild is now unavailable.
UserUpdate(UserUpdate)
The current user was updated.
VoiceServerUpdate(VoiceServerUpdate)
A voice server update was sent.
VoiceStateUpdate(Box<VoiceStateUpdate>)
A voice state in a voice channel was updated.
WebhooksUpdate(WebhooksUpdate)
A webhook was updated.
Implementations
Trait Implementations
sourceimpl From<DispatchEvent> for Event
impl From<DispatchEvent> for Event
sourcefn from(event: DispatchEvent) -> Self
fn from(event: DispatchEvent) -> Self
Converts to this type from the input type.
sourceimpl From<GatewayEvent> for Event
impl From<GatewayEvent> for Event
sourcefn from(event: GatewayEvent) -> Self
fn from(event: GatewayEvent) -> Self
Converts to this type from the input type.
sourceimpl From<ShardEvent> for Event
impl From<ShardEvent> for Event
sourcefn from(event: ShardEvent) -> Self
fn from(event: ShardEvent) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<Event> for Event
impl PartialEq<Event> for Event
sourceimpl TryFrom<Event> for DispatchEvent
impl TryFrom<Event> for DispatchEvent
sourceimpl TryFrom<Event> for GatewayEvent
impl TryFrom<Event> for GatewayEvent
sourceimpl TryFrom<Event> for ShardEvent
impl TryFrom<Event> for ShardEvent
impl StructuralPartialEq for Event
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more