Enum twilight_model::gateway::event::Event [−][src]
pub enum Event {
Show 58 variants
BanAdd(BanAdd),
BanRemove(BanRemove),
ChannelCreate(ChannelCreate),
ChannelDelete(ChannelDelete),
ChannelPinsUpdate(ChannelPinsUpdate),
ChannelUpdate(ChannelUpdate),
GatewayHeartbeat(u64),
GatewayHeartbeatAck,
GatewayHello(u64),
GatewayInvalidateSession(bool),
GatewayReconnect,
GiftCodeUpdate,
GuildCreate(Box<GuildCreate>),
GuildDelete(Box<GuildDelete>),
GuildEmojisUpdate(GuildEmojisUpdate),
GuildIntegrationsUpdate(GuildIntegrationsUpdate),
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),
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
A user was banned from a guild.
Tuple Fields of BanAdd
0: BanAddA user’s ban from a guild was removed.
Tuple Fields of BanRemove
0: BanRemoveA channel was created.
Tuple Fields of ChannelCreate
A channel was deleted.
Tuple Fields of ChannelDelete
A channel’s pins were updated.
Tuple Fields of ChannelPinsUpdate
A channel was updated.
Tuple Fields of ChannelUpdate
A heartbeat was sent to or received from the gateway.
Tuple Fields of GatewayHeartbeat
0: u64A heartbeat acknowledgement was received from the gateway.
A “hello” packet was received from the gateway.
Tuple Fields of GatewayHello
0: u64A shard’s session was invalidated.
true if resumeable. If not, then the shard must do a full reconnect.
Tuple Fields of GatewayInvalidateSession
0: boolThe gateway is indicating to perform a reconnect.
Undocumented event, should be ignored
A guild was created.
Tuple Fields of GuildCreate
0: Box<GuildCreate>A guild was deleted or the current user was removed from a guild.
Tuple Fields of GuildDelete
0: Box<GuildDelete>A guild’s emojis were updated.
Tuple Fields of GuildEmojisUpdate
A guild’s integrations were updated.
Tuple Fields of GuildIntegrationsUpdate
A guild was updated.
Tuple Fields of GuildUpdate
0: Box<GuildUpdate>A guild integration was created.
Tuple Fields of IntegrationCreate
0: Box<IntegrationCreate>A guild integration was updated.
Tuple Fields of IntegrationDelete
A guild integration was deleted.
Tuple Fields of IntegrationUpdate
0: Box<IntegrationUpdate>An interaction was invoked by a user.
Tuple Fields of InteractionCreate
0: Box<InteractionCreate>A invite was made.
Tuple Fields of InviteCreate
0: Box<InviteCreate>A invite was deleted.
Tuple Fields of InviteDelete
0: InviteDeleteA user was added to a guild.
A user was removed from a guild.
Tuple Fields of MemberRemove
0: MemberRemoveA user’s member object in a guild was updated.
Tuple Fields of MemberUpdate
0: Box<MemberUpdate>A chunk of members were received from the gateway.
Tuple Fields of MemberChunk
0: MemberChunkA message was created in a channel.
Tuple Fields of MessageCreate
0: Box<MessageCreate>A message was deleted in a channel.
Tuple Fields of MessageDelete
Multiple messages were deleted in a channel.
Tuple Fields of MessageDeleteBulk
A message was updated in a channel.
Tuple Fields of MessageUpdate
0: Box<MessageUpdate>A user’s active presence (such as game or online status) was updated.
Tuple Fields of PresenceUpdate
0: Box<PresenceUpdate>Multiple presences outside of a guild were updated.
For bots this is always empty and useless.
A reaction was added to a message.
Tuple Fields of ReactionAdd
0: Box<ReactionAdd>A reaction was removed from a message.
Tuple Fields of ReactionRemove
0: Box<ReactionRemove>All reactions were removed from a message.
Tuple Fields of ReactionRemoveAll
All instances of a given emoji from the reactions of a message were removed.
Tuple Fields of ReactionRemoveEmoji
A shard is now “ready” and fully connected.
A shard has successfully resumed.
A role was created in a guild.
Tuple Fields of RoleCreate
0: RoleCreateA role was deleted in a guild.
Tuple Fields of RoleDelete
0: RoleDeleteA role was updated in a guild.
Tuple Fields of RoleUpdate
0: RoleUpdateA shard is now in a connected stage after being fully connected to the gateway.
Tuple Fields of ShardConnected
0: ConnectedA shard is now in a connecting stage after starting to connect to the gateway.
Tuple Fields of ShardConnecting
0: ConnectingA shard is now in a disconnected stage after the connection was closed.
Tuple Fields of ShardDisconnected
0: DisconnectedA shard is now in a identifying stage after starting a new session.
Tuple Fields of ShardIdentifying
0: IdentifyingA shard is now in a reconnecting stage after a disconnect or session was ended.
Tuple Fields of ShardReconnecting
0: ReconnectingA payload of bytes came in through the shard’s connection.
Tuple Fields of ShardPayload
0: PayloadA shard is now in a Resuming stage after a disconnect.
Tuple Fields of ShardResuming
0: ResumingA stage instance was created in a stage channel.
Tuple Fields of StageInstanceCreate
A stage instance was deleted in a stage channel.
Tuple Fields of StageInstanceDelete
A stage instance was updated in a stage channel.
Tuple Fields of StageInstanceUpdate
A user started typing in a channel.
Tuple Fields of TypingStart
0: Box<TypingStart>A guild is now unavailable.
The current user was updated.
Tuple Fields of UserUpdate
0: UserUpdateA voice server update was sent.
Tuple Fields of VoiceServerUpdate
A voice state in a voice channel was updated.
Tuple Fields of VoiceStateUpdate
0: Box<VoiceStateUpdate>A webhook was updated.
Tuple Fields of WebhooksUpdate
Implementations
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more