Events topic
This topic contains all the classes that represent events received from Discord's Gateway API.
It does not contain the logic for connecting to the Gateway itself. For that, see the Gateway topic.
There are two main types of events received from the Gateway:
- Most subclasses of GatewayEvent are relevant for controlling session state.
These events are handled by
nyxxinternally, but you can listen to them using Gateway.messages and looking for EventReceived events. - Subclasses of DispatchEvent are sent when Discord informs your client of
some state changing, such as a Message being created or a User updating
their Activity. To listen for DispatchEvents, use the Gateway.events
stream, or one of the event-specific streams available on NyxxGateway
(
client.onXXXEvent). Note that only RawDispatchEvents that have not been parsed will be emitted on the Gateway.messages stream.
To control which DispatchEvents your client receives, please see GatewayApiOptions.intents.
Classes
- ApplicationCommandPermissionsUpdateEvent Events
- Emitted when the permissions for an application command are updated.
- AutoModerationActionExecutionEvent Events
- Emitted when an auto moderation action is taken.
- AutoModerationRuleCreateEvent Events
- Emitted when an auto moderation rule is created.
- AutoModerationRuleDeleteEvent Events
- Emitted when an auto moderation rule is deleted.
- AutoModerationRuleUpdateEvent Events
- Emitted when an auto moderation rule is updated.
- ChannelCreateEvent Events
- Emitted when a channel is created.
- ChannelDeleteEvent Events
- Emitted when a channel is deleted.
- ChannelInfo Events
- Ephemeral information about channels in a Guild.
- ChannelInfoEvent Events
- Sent in response to a request channel info event.
- ChannelPinsUpdateEvent Events
- Emitted when the pinned messages in a channel are changed.
- ChannelUpdateEvent Events
- Emitted when a channel is updated.
- DispatchEvent Gateway Events
- The base class for all events sent by dispatch.
- EntitlementCreateEvent Events
- Emitted when an entitlement is created.
- EntitlementDeleteEvent Events
- Emitted when an entitlement is deleted.
- EntitlementUpdateEvent Events
- Emitted when an entitlement is updated.
- GatewayEvent Gateway Events
- The base class for all events received from the Gateway.
- GuildAuditLogCreateEvent Events
- Emitted when an audit log entry is created in a guild.
- GuildBanAddEvent Events
- Emitted when a user is banned in a guild.
- GuildBanRemoveEvent Events
- Emitted when a user is unbanned in a guild.
- GuildCreateEvent Events
- Emitted when a client is added to a guild or when initially receiving guilds over the Gateway.
- GuildDeleteEvent Events
- Emitted when the client is removed from a guild.
- GuildEmojisUpdateEvent Events
- Emitted when a guild's emojis are updated.
- GuildIntegrationsUpdateEvent Events
- Emitted when a guild's integrations are updated.
- GuildMemberAddEvent Events
- Emitted when a member joins a guild.
- GuildMemberRemoveEvent Events
- Emitted when a member is removed from a guild.
- GuildMembersChunkEvent Events
- Emitted as a response to Gateway.listGuildMembers.
- GuildMemberUpdateEvent Events
- Emitted when a guild member is updated.
- GuildRoleCreateEvent Events
- Emitted when a role is created in a guild.
- GuildRoleDeleteEvent Events
- Emitted when a role is deleted in a guild.
- GuildRoleUpdateEvent Events
- Emitted when a role is updated in a guild
- GuildScheduledEventCreateEvent Events
- Emitted when a scheduled event is created.
- GuildScheduledEventDeleteEvent Events
- Emitted when a scheduled event is deleted.
- GuildScheduledEventUpdateEvent Events
- Emitted when a scheduled event is updated.
- GuildScheduledEventUserAddEvent Events
- Emitted when a user is added to a scheduled event.
- GuildScheduledEventUserRemoveEvent Events
- Emitted when a user is removed from a scheduled event.
- GuildStickersUpdateEvent Events
- Emitted when a guild's stickers are updated.
- GuildUpdateEvent Events
- Emitted when a guild is updated.
- HeartbeatAckEvent Events
- Emitted when the server acknowledges the client's heartbeat.
- HeartbeatEvent Events
- Emitted when the client receives a request to heartbeat.
- HelloEvent Events
- Emitted when the client first establishes a connection to the gateway.
- IntegrationCreateEvent Events
- Emitted when an integration is created.
- IntegrationDeleteEvent Events
- Emitted when an integration is deleted.
- IntegrationUpdateEvent Events
- Emitted when an integration is updated.
-
InteractionCreateEvent<
T extends Interaction> Events - Emitted when an interaction is received by the client.
- InvalidSessionEvent Events
- Emitted when the client's session is invalid.
- InviteCreateEvent Events
- Emitted when an invite is created.
- InviteDeleteEvent Events
- Emitted when an invite is deleted.
- MessageBulkDeleteEvent Events
- Emitted when multiple messages are bulk deleted.
- MessageCreateEvent Events
- Emitted when a message is sent.
- MessageDeleteEvent Events
- Emitted when a message is deleted.
- MessagePollVoteAddEvent Events
- Emitted when user votes on a poll. If the poll allows multiple selection, one event will be sent per answer.
- MessagePollVoteRemoveEvent Events
- Emitted when user removes their vote on a poll. If the poll allows for multiple selections, one event will be sent per answer.
- MessageReactionAddEvent Events
- Emitted when a reaction is added to a message.
- MessageReactionRemoveAllEvent Events
- Emitted when all reactions are removed from a message.
- MessageReactionRemoveEmojiEvent Events
- Emitted when all reactions of a specific emoji are removed from a message.
- MessageReactionRemoveEvent Events
- Emitted when a reaction is removed from a message.
- MessageUpdateEvent Events
- Emitted when a message is updated.
- PresenceUpdateEvent Events
- Emitted when a user updates their presence.
-
RateLimitedEvent<
T extends RateLimitedMetadata> Events - An event emitted when a Gateway request encounters a rate limit.
- RawDispatchEvent Events
- An unparsed dispatch event.
- ReadyEvent Events
- Emitted when the client's Gateway session is established.
- ReconnectEvent Events
- Emitted when the client receives a request to reconnect.
- ResumedEvent Events
- Emitted when the client resumes a Gateway session.
- SoundboardSoundCreateEvent Events
- Emitted when a guild soundboard sound is created.
- SoundboardSoundDeleteEvent Events
- Emitted when a guild soundboard sound is deleted.
- SoundboardSoundsEvent Events
- Sent in response to a soundboard sounds request.
- SoundboardSoundsUpdateEvent Events
- Emitted when multiple guild soundboard sounds are updated.
- SoundboardSoundUpdateEvent Events
- Emitted when a guild soundboard sound is updated.
- StageInstanceCreateEvent Events
- Emitted when a stage instance is created.
- StageInstanceDeleteEvent Events
- Emitted when a stage instance is deleted.
- StageInstanceUpdateEvent Events
- Emitted when a stage instance is updated.
- SubscriptionCreateEvent Events
- Sent when a Subscription is created.
- SubscriptionDeleteEvent Events
- Sent when a Subscription is deleted.
- SubscriptionUpdateEvent Events
- Sent when a Subscription is updated.
- ThreadCreateEvent Events
- Emitted when a thread is created.
- ThreadDeleteEvent Events
- Emitted when a thread is deleted.
- ThreadListSyncEvent Events
- Emitted when the client's thread list is synced.
- ThreadMembersUpdateEvent Events
- Emitted when a members in a thread are updated.
- ThreadMemberUpdateEvent Events
- Emitted when the client's thread member is updated.
- ThreadUpdateEvent Events
- Emitted when a thread is updated.
- TypingStartEvent Events
- Emitted when a user starts typing in a channel.
- Emitted when the client is added to an unavailable guild, or when initially receiving guilds over the Gateway.
- UnknownDispatchEvent Events
- Emitted when a RawDispatchEvent could not be parsed to a DispatchEvent due to the event being unknown.
- UserUpdateEvent Events
- Emitted when a user is updated.
- VoiceChannelEffectSendEvent Events
- Emitted when someone sends an effect, such as an emoji reaction or a soundboard sound, in a voice channel the current user is connected to.
- VoiceChannelStartTimeUpdateEvent Events
- Emitted when a VoiceChannel updates its start time.
- VoiceChannelStatusUpdateEvent Events
- Emitted when a VoiceChannel updates its status.
- VoiceServerUpdateEvent Events
- Emitted when joining a voice channel to update the voice servers.
- VoiceStateUpdateEvent Events
- Emitted when a user's voice state is updated.
- WebhooksUpdateEvent Events
- Emitted when the webhooks in a channel are updated.