Enum serenity::model::event::Event [−][src]
#[non_exhaustive] pub enum Event {}Show 54 variants
ChannelCreate(ChannelCreateEvent), ChannelDelete(ChannelDeleteEvent), ChannelPinsUpdate(ChannelPinsUpdateEvent), ChannelUpdate(ChannelUpdateEvent), GuildBanAdd(GuildBanAddEvent), GuildBanRemove(GuildBanRemoveEvent), GuildCreate(GuildCreateEvent), GuildDelete(GuildDeleteEvent), GuildEmojisUpdate(GuildEmojisUpdateEvent), GuildIntegrationsUpdate(GuildIntegrationsUpdateEvent), GuildMemberAdd(GuildMemberAddEvent), GuildMemberRemove(GuildMemberRemoveEvent), GuildMemberUpdate(GuildMemberUpdateEvent), GuildMembersChunk(GuildMembersChunkEvent), GuildRoleCreate(GuildRoleCreateEvent), GuildRoleDelete(GuildRoleDeleteEvent), GuildRoleUpdate(GuildRoleUpdateEvent), GuildUnavailable(GuildUnavailableEvent), GuildUpdate(GuildUpdateEvent), InviteCreate(InviteCreateEvent), InviteDelete(InviteDeleteEvent), MessageCreate(MessageCreateEvent), MessageDelete(MessageDeleteEvent), MessageDeleteBulk(MessageDeleteBulkEvent), MessageUpdate(MessageUpdateEvent), PresenceUpdate(PresenceUpdateEvent), PresencesReplace(PresencesReplaceEvent), ReactionAdd(ReactionAddEvent), ReactionRemove(ReactionRemoveEvent), ReactionRemoveAll(ReactionRemoveAllEvent), Ready(ReadyEvent), Resumed(ResumedEvent), TypingStart(TypingStartEvent), UserUpdate(UserUpdateEvent), VoiceStateUpdate(VoiceStateUpdateEvent), VoiceServerUpdate(VoiceServerUpdateEvent), WebhookUpdate(WebhookUpdateEvent), InteractionCreate(InteractionCreateEvent), IntegrationCreate(IntegrationCreateEvent), IntegrationUpdate(IntegrationUpdateEvent), IntegrationDelete(IntegrationDeleteEvent), ApplicationCommandCreate(ApplicationCommandCreateEvent), ApplicationCommandUpdate(ApplicationCommandUpdateEvent), ApplicationCommandDelete(ApplicationCommandDeleteEvent), StageInstanceCreate(StageInstanceCreateEvent), StageInstanceUpdate(StageInstanceUpdateEvent), StageInstanceDelete(StageInstanceDeleteEvent), ThreadCreate(ThreadCreateEvent), ThreadUpdate(ThreadUpdateEvent), ThreadDelete(ThreadDeleteEvent), ThreadListSync(ThreadListSyncEvent), ThreadMemberUpdate(ThreadMemberUpdateEvent), ThreadMembersUpdate(ThreadMembersUpdateEvent), Unknown(UnknownEvent),
Expand description
Event received over a websocket connection
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
A Channel
was created.
Fires the EventHandler::channel_create
event.
Tuple Fields of ChannelCreate
A Channel
has been deleted.
Fires the EventHandler::channel_delete
event.
Tuple Fields of ChannelDelete
The pins for a Channel
have been updated.
Fires the EventHandler::channel_pins_update
event.
Tuple Fields of ChannelPinsUpdate
A Channel
has been updated.
Fires the EventHandler::channel_update
event.
Tuple Fields of ChannelUpdate
Tuple Fields of GuildBanAdd
Tuple Fields of GuildBanRemove
Tuple Fields of GuildCreate
Tuple Fields of GuildDelete
Tuple Fields of GuildEmojisUpdate
Tuple Fields of GuildIntegrationsUpdate
Tuple Fields of GuildMemberAdd
Tuple Fields of GuildMemberRemove
A member’s roles have changed
Tuple Fields of GuildMemberUpdate
Tuple Fields of GuildMembersChunk
Tuple Fields of GuildRoleCreate
Tuple Fields of GuildRoleDelete
Tuple Fields of GuildRoleUpdate
When a guild is unavailable, such as due to a Discord server outage.
Tuple Fields of GuildUpdate
An Invite
was created.
Fires the EventHandler::invite_create
event handler.
Tuple Fields of InviteCreate
An Invite
was deleted.
Fires the EventHandler::invite_delete
event handler.
Tuple Fields of InviteDelete
Tuple Fields of MessageCreate
Tuple Fields of MessageDelete
Tuple Fields of MessageDeleteBulk
A message has been edited, either by the user or the system
Tuple Fields of MessageUpdate
A member’s presence state (or username or avatar) has changed
Tuple Fields of PresenceUpdate
The precense list of the user’s friends should be replaced entirely
Tuple Fields of PresencesReplace
A reaction was added to a message.
Fires the EventHandler::reaction_add
event handler.
Tuple Fields of ReactionAdd
A reaction was removed to a message.
Fires the EventHandler::reaction_remove
event handler.
Tuple Fields of ReactionRemove
A request was issued to remove all Reaction
s from a Message
.
Fires the EventHandler::reaction_remove_all
event handler.
Tuple Fields of ReactionRemoveAll
The first event in a connection, containing the initial ready cache.
May also be received at a later time in the event of a reconnect.
Tuple Fields of Ready
0: ReadyEvent
The connection has successfully resumed after a disconnect.
Tuple Fields of Resumed
0: ResumedEvent
A user is typing; considered to last 5 seconds
Tuple Fields of TypingStart
Update to the logged-in user’s information
Tuple Fields of UserUpdate
A member’s voice state has changed
Tuple Fields of VoiceStateUpdate
Voice server information is available
Tuple Fields of VoiceServerUpdate
Tuple Fields of WebhookUpdate
unstable_discord_api
only.An interaction was created.
Tuple Fields of InteractionCreate
unstable_discord_api
only.A guild integration was created
Tuple Fields of IntegrationCreate
unstable_discord_api
only.A guild integration was updated
Tuple Fields of IntegrationUpdate
unstable_discord_api
only.A guild integration was deleted
Tuple Fields of IntegrationDelete
unstable_discord_api
only.An application command was created
Tuple Fields of ApplicationCommandCreate
unstable_discord_api
only.An application command was updated
Tuple Fields of ApplicationCommandUpdate
unstable_discord_api
only.An application command was deleted
Tuple Fields of ApplicationCommandDelete
A stage instance was created.
Tuple Fields of StageInstanceCreate
A stage instance was updated.
Tuple Fields of StageInstanceUpdate
A stage instance was deleted.
Tuple Fields of StageInstanceDelete
A thread was created or the current user was added to a private thread.
Tuple Fields of ThreadCreate
A thread was updated.
Tuple Fields of ThreadUpdate
A thread was deleted.
Tuple Fields of ThreadDelete
The current user gains access to a channel.
Tuple Fields of ThreadListSync
The ThreadMember
object for the current user is updated.
Tuple Fields of ThreadMemberUpdate
Anyone is added to or removed from a thread. If the current user does not have the GatewayIntents::GUILDS
,
then this event will only be sent if the current user was added to or removed from the thread.
Tuple Fields of ThreadMembersUpdate
An event type not covered by the above
Tuple Fields of Unknown
0: UnknownEvent
Implementations
Return the type of this event.
Channel ID(s) related to this event.
Message ID(s) related to this event.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self