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

BanAdd

A user was banned from a guild.

Tuple Fields of BanAdd

0: BanAdd
BanRemove

A user’s ban from a guild was removed.

Tuple Fields of BanRemove

0: BanRemove
ChannelCreate

A channel was created.

Tuple Fields of ChannelCreate

0: ChannelCreate
ChannelDelete

A channel was deleted.

Tuple Fields of ChannelDelete

0: ChannelDelete
ChannelPinsUpdate

A channel’s pins were updated.

Tuple Fields of ChannelPinsUpdate

0: ChannelPinsUpdate
ChannelUpdate

A channel was updated.

Tuple Fields of ChannelUpdate

0: ChannelUpdate
GatewayHeartbeat

A heartbeat was sent to or received from the gateway.

Tuple Fields of GatewayHeartbeat

0: u64
GatewayHeartbeatAck

A heartbeat acknowledgement was received from the gateway.

GatewayHello

A “hello” packet was received from the gateway.

Tuple Fields of GatewayHello

0: u64
GatewayInvalidateSession

A shard’s session was invalidated.

true if resumeable. If not, then the shard must do a full reconnect.

Tuple Fields of GatewayInvalidateSession

0: bool
GatewayReconnect

The gateway is indicating to perform a reconnect.

GiftCodeUpdate

Undocumented event, should be ignored

GuildCreate

A guild was created.

Tuple Fields of GuildCreate

0: Box<GuildCreate>
GuildDelete

A guild was deleted or the current user was removed from a guild.

Tuple Fields of GuildDelete

0: Box<GuildDelete>
GuildEmojisUpdate

A guild’s emojis were updated.

Tuple Fields of GuildEmojisUpdate

0: GuildEmojisUpdate
GuildIntegrationsUpdate

A guild’s integrations were updated.

Tuple Fields of GuildIntegrationsUpdate

0: GuildIntegrationsUpdate
GuildUpdate

A guild was updated.

Tuple Fields of GuildUpdate

0: Box<GuildUpdate>
IntegrationCreate

A guild integration was created.

Tuple Fields of IntegrationCreate

0: Box<IntegrationCreate>
IntegrationDelete

A guild integration was updated.

Tuple Fields of IntegrationDelete

0: IntegrationDelete
IntegrationUpdate

A guild integration was deleted.

Tuple Fields of IntegrationUpdate

0: Box<IntegrationUpdate>
InteractionCreate

An interaction was invoked by a user.

Tuple Fields of InteractionCreate

0: Box<InteractionCreate>
InviteCreate

A invite was made.

Tuple Fields of InviteCreate

0: Box<InviteCreate>
InviteDelete

A invite was deleted.

Tuple Fields of InviteDelete

0: InviteDelete
MemberAdd

A user was added to a guild.

Tuple Fields of MemberAdd

0: Box<MemberAdd>
MemberRemove

A user was removed from a guild.

Tuple Fields of MemberRemove

0: MemberRemove
MemberUpdate

A user’s member object in a guild was updated.

Tuple Fields of MemberUpdate

0: Box<MemberUpdate>
MemberChunk

A chunk of members were received from the gateway.

Tuple Fields of MemberChunk

0: MemberChunk
MessageCreate

A message was created in a channel.

Tuple Fields of MessageCreate

0: Box<MessageCreate>
MessageDelete

A message was deleted in a channel.

Tuple Fields of MessageDelete

0: MessageDelete
MessageDeleteBulk

Multiple messages were deleted in a channel.

Tuple Fields of MessageDeleteBulk

0: MessageDeleteBulk
MessageUpdate

A message was updated in a channel.

Tuple Fields of MessageUpdate

0: Box<MessageUpdate>
PresenceUpdate

A user’s active presence (such as game or online status) was updated.

Tuple Fields of PresenceUpdate

0: Box<PresenceUpdate>
PresencesReplace

Multiple presences outside of a guild were updated.

For bots this is always empty and useless.

ReactionAdd

A reaction was added to a message.

Tuple Fields of ReactionAdd

0: Box<ReactionAdd>
ReactionRemove

A reaction was removed from a message.

Tuple Fields of ReactionRemove

0: Box<ReactionRemove>
ReactionRemoveAll

All reactions were removed from a message.

Tuple Fields of ReactionRemoveAll

0: ReactionRemoveAll
ReactionRemoveEmoji

All instances of a given emoji from the reactions of a message were removed.

Tuple Fields of ReactionRemoveEmoji

0: ReactionRemoveEmoji
Ready

A shard is now “ready” and fully connected.

Tuple Fields of Ready

0: Box<Ready>
Resumed

A shard has successfully resumed.

RoleCreate

A role was created in a guild.

Tuple Fields of RoleCreate

0: RoleCreate
RoleDelete

A role was deleted in a guild.

Tuple Fields of RoleDelete

0: RoleDelete
RoleUpdate

A role was updated in a guild.

Tuple Fields of RoleUpdate

0: RoleUpdate
ShardConnected

A shard is now in a connected stage after being fully connected to the gateway.

Tuple Fields of ShardConnected

0: Connected
ShardConnecting

A shard is now in a connecting stage after starting to connect to the gateway.

Tuple Fields of ShardConnecting

0: Connecting
ShardDisconnected

A shard is now in a disconnected stage after the connection was closed.

Tuple Fields of ShardDisconnected

0: Disconnected
ShardIdentifying

A shard is now in a identifying stage after starting a new session.

Tuple Fields of ShardIdentifying

0: Identifying
ShardReconnecting

A shard is now in a reconnecting stage after a disconnect or session was ended.

Tuple Fields of ShardReconnecting

0: Reconnecting
ShardPayload

A payload of bytes came in through the shard’s connection.

Tuple Fields of ShardPayload

0: Payload
ShardResuming

A shard is now in a Resuming stage after a disconnect.

Tuple Fields of ShardResuming

0: Resuming
StageInstanceCreate

A stage instance was created in a stage channel.

Tuple Fields of StageInstanceCreate

0: StageInstanceCreate
StageInstanceDelete

A stage instance was deleted in a stage channel.

Tuple Fields of StageInstanceDelete

0: StageInstanceDelete
StageInstanceUpdate

A stage instance was updated in a stage channel.

Tuple Fields of StageInstanceUpdate

0: StageInstanceUpdate
TypingStart

A user started typing in a channel.

Tuple Fields of TypingStart

0: Box<TypingStart>
UnavailableGuild

A guild is now unavailable.

Tuple Fields of UnavailableGuild

0: UnavailableGuild
UserUpdate

The current user was updated.

Tuple Fields of UserUpdate

0: UserUpdate
VoiceServerUpdate

A voice server update was sent.

Tuple Fields of VoiceServerUpdate

0: VoiceServerUpdate
VoiceStateUpdate

A voice state in a voice channel was updated.

Tuple Fields of VoiceStateUpdate

0: Box<VoiceStateUpdate>
WebhooksUpdate

A webhook was updated.

Tuple Fields of WebhooksUpdate

0: WebhooksUpdate

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.