#[non_exhaustive]pub struct Events;Expand description
The events a Client can emit, as typed values (D-222).
Pass one of these to Client::on. The names are those of
discord.js’ Events (Events.MessageCreate, Events.GuildRoleUpdate, …); gateway
dispatches discord.js has no event for are named after the dispatch
(INTEGRATION_CREATE is IntegrationCreate).
See the module documentation for what handlers receive and in which order.
Implementations§
Source§impl Events
impl Events
Sourcepub const ClientReady: ClientReady = ClientReady
pub const ClientReady: ClientReady = ClientReady
The client is ready: fired once per login, at the READY of
the last of its shards to become ready (D-224).
It does not wait for the guilds’ GUILD_CREATEs, so the cache may still be filling
(discord.js waits for them). The payload is that shard’s READY: its user and
application are the same on every shard, its guilds are that shard’s.
discord.js: Events.ClientReady (clientReady).
Sourcepub const ShardReady: ShardReady = ShardReady
pub const ShardReady: ShardReady = ShardReady
A shard’s session is ready (READY): after connecting, and again after every
re-identify (not after a resume, see ShardResume).
The shard is Context::shard_id; the guilds in the payload
arrive as GuildAvailable afterwards.
discord.js: Events.ShardReady (shardReady).
Sourcepub const ShardResume: ShardResume = ShardResume
pub const ShardResume: ShardResume = ShardResume
A shard resumed its session (RESUMED) after a reconnect; Discord replayed the events
it missed, counted in ShardResume::replayed.
discord.js: Events.ShardResume (shardResume).
Sourcepub const ShardReconnecting: ShardReconnecting = ShardReconnecting
pub const ShardReconnecting: ShardReconnecting = ShardReconnecting
A shard lost its connection and is reconnecting (it resumes when it can, otherwise it identifies again).
Fired at the first event after the connection was lost, at the latest at the new connection’s hello.
discord.js: Events.ShardReconnecting (shardReconnecting).
Sourcepub const Invalidated: Invalidated = Invalidated
pub const Invalidated: Invalidated = Invalidated
Discord invalidated a shard’s session (INVALID_SESSION that cannot be resumed): the
shard identifies again, and the events in between are lost.
discord.js lists Events.Invalidated (invalidated) but v14 no longer emits it; here
it marks a lost session.
Sourcepub const ShardError: ShardError = ShardError
pub const ShardError: ShardError = ShardError
A shard hit an error it recovers from (a failed connection, a payload that could not be decoded, …); it reconnects or skips the payload by itself.
discord.js: Events.ShardError (shardError).
Sourcepub const ShardDisconnect: ShardDisconnect = ShardDisconnect
pub const ShardDisconnect: ShardDisconnect = ShardDisconnect
Sourcepub const Raw: Raw = Raw
pub const Raw: Raw = Raw
Every gateway dispatch, decoded, before the cache’s events and the derived ones.
Only handlers receive it; registering one costs a clone of every dispatch.
discord.js: Events.Raw (raw), which hands the undecoded packet.
Sourcepub const ApplicationCommandPermissionsUpdate: ApplicationCommandPermissionsUpdate = ApplicationCommandPermissionsUpdate
pub const ApplicationCommandPermissionsUpdate: ApplicationCommandPermissionsUpdate = ApplicationCommandPermissionsUpdate
An application command’s permissions were updated (APPLICATION_COMMAND_PERMISSIONS_UPDATE).
discord.js: Events.ApplicationCommandPermissionsUpdate.
Sourcepub const AutoModerationActionExecution: AutoModerationActionExecution = AutoModerationActionExecution
pub const AutoModerationActionExecution: AutoModerationActionExecution = AutoModerationActionExecution
An auto moderation rule acted on a message or member
(AUTO_MODERATION_ACTION_EXECUTION). Intent: AUTO_MODERATION_EXECUTION.
discord.js: Events.AutoModerationActionExecution.
Sourcepub const AutoModerationRuleCreate: AutoModerationRuleCreate = AutoModerationRuleCreate
pub const AutoModerationRuleCreate: AutoModerationRuleCreate = AutoModerationRuleCreate
An auto moderation rule was created (AUTO_MODERATION_RULE_CREATE). Intent:
AUTO_MODERATION_CONFIGURATION.
discord.js: Events.AutoModerationRuleCreate.
Sourcepub const AutoModerationRuleUpdate: AutoModerationRuleUpdate = AutoModerationRuleUpdate
pub const AutoModerationRuleUpdate: AutoModerationRuleUpdate = AutoModerationRuleUpdate
An auto moderation rule was updated (AUTO_MODERATION_RULE_UPDATE). Intent:
AUTO_MODERATION_CONFIGURATION.
The cache does not keep rules, so there is no old rule (C-091).
discord.js: Events.AutoModerationRuleUpdate.
Sourcepub const AutoModerationRuleDelete: AutoModerationRuleDelete = AutoModerationRuleDelete
pub const AutoModerationRuleDelete: AutoModerationRuleDelete = AutoModerationRuleDelete
An auto moderation rule was deleted (AUTO_MODERATION_RULE_DELETE). Intent:
AUTO_MODERATION_CONFIGURATION.
discord.js: Events.AutoModerationRuleDelete.
Sourcepub const EntitlementCreate: EntitlementCreate = EntitlementCreate
pub const EntitlementCreate: EntitlementCreate = EntitlementCreate
A user subscribed to a SKU (ENTITLEMENT_CREATE).
discord.js: Events.EntitlementCreate.
Sourcepub const EntitlementUpdate: EntitlementUpdate = EntitlementUpdate
pub const EntitlementUpdate: EntitlementUpdate = EntitlementUpdate
An entitlement was updated, for example renewed (ENTITLEMENT_UPDATE).
discord.js: Events.EntitlementUpdate.
Sourcepub const EntitlementDelete: EntitlementDelete = EntitlementDelete
pub const EntitlementDelete: EntitlementDelete = EntitlementDelete
An entitlement was deleted (ENTITLEMENT_DELETE).
discord.js: Events.EntitlementDelete.
Sourcepub const SubscriptionCreate: SubscriptionCreate = SubscriptionCreate
pub const SubscriptionCreate: SubscriptionCreate = SubscriptionCreate
A premium subscription was created (SUBSCRIPTION_CREATE).
discord.js: Events.SubscriptionCreate.
Sourcepub const SubscriptionUpdate: SubscriptionUpdate = SubscriptionUpdate
pub const SubscriptionUpdate: SubscriptionUpdate = SubscriptionUpdate
A premium subscription was updated (SUBSCRIPTION_UPDATE).
discord.js: Events.SubscriptionUpdate.
Sourcepub const SubscriptionDelete: SubscriptionDelete = SubscriptionDelete
pub const SubscriptionDelete: SubscriptionDelete = SubscriptionDelete
A premium subscription was deleted (SUBSCRIPTION_DELETE).
discord.js: Events.SubscriptionDelete.
Sourcepub const ChannelCreate: ChannelCreate = ChannelCreate
pub const ChannelCreate: ChannelCreate = ChannelCreate
A guild channel was created (CHANNEL_CREATE). Intent: GUILDS.
discord.js: Events.ChannelCreate.
Sourcepub const ChannelUpdate: ChannelUpdate = ChannelUpdate
pub const ChannelUpdate: ChannelUpdate = ChannelUpdate
A channel was updated (CHANNEL_UPDATE), with the cached channel before the update.
Intent: GUILDS.
discord.js: Events.ChannelUpdate (oldChannel, newChannel).
Sourcepub const ChannelDelete: ChannelDelete = ChannelDelete
pub const ChannelDelete: ChannelDelete = ChannelDelete
A channel was deleted (CHANNEL_DELETE), with the cached channel. Intent: GUILDS.
discord.js: Events.ChannelDelete.
Sourcepub const ChannelPinsUpdate: ChannelPinsUpdate = ChannelPinsUpdate
pub const ChannelPinsUpdate: ChannelPinsUpdate = ChannelPinsUpdate
A message was pinned or unpinned (CHANNEL_PINS_UPDATE). Intents: GUILDS,
DIRECT_MESSAGES.
discord.js: Events.ChannelPinsUpdate.
Sourcepub const ChannelInfo: ChannelInfo = ChannelInfo
pub const ChannelInfo: ChannelInfo = ChannelInfo
The ephemeral data of a guild’s channels (CHANNEL_INFO), the answer to a
RequestChannelInfo command.
discord.js has no such event (C-091).
Sourcepub const ThreadCreate: ThreadCreate = ThreadCreate
pub const ThreadCreate: ThreadCreate = ThreadCreate
A thread was created, or the bot was added to one (THREAD_CREATE). Intent: GUILDS.
discord.js: Events.ThreadCreate (newly_created is a field of the payload).
Sourcepub const ThreadUpdate: ThreadUpdate = ThreadUpdate
pub const ThreadUpdate: ThreadUpdate = ThreadUpdate
A thread was updated (THREAD_UPDATE), with the cached thread before the update.
Intent: GUILDS.
discord.js: Events.ThreadUpdate (oldThread, newThread).
Sourcepub const ThreadDelete: ThreadDelete = ThreadDelete
pub const ThreadDelete: ThreadDelete = ThreadDelete
A thread was deleted (THREAD_DELETE), with the cached thread. Intent: GUILDS.
discord.js: Events.ThreadDelete.
Sourcepub const ThreadListSync: ThreadListSync = ThreadListSync
pub const ThreadListSync: ThreadListSync = ThreadListSync
The bot gained access to channels: their active threads (THREAD_LIST_SYNC). Intent:
GUILDS.
discord.js: Events.ThreadListSync.
Sourcepub const ThreadMemberUpdate: ThreadMemberUpdate = ThreadMemberUpdate
pub const ThreadMemberUpdate: ThreadMemberUpdate = ThreadMemberUpdate
The bot’s own thread member was updated (THREAD_MEMBER_UPDATE). Intent: GUILDS.
The cache does not keep the bot’s thread member, so there is no old one (C-091).
discord.js: Events.ThreadMemberUpdate.
Sourcepub const ThreadMembersUpdate: ThreadMembersUpdate = ThreadMembersUpdate
pub const ThreadMembersUpdate: ThreadMembersUpdate = ThreadMembersUpdate
Members were added to or removed from a thread (THREAD_MEMBERS_UPDATE). Intents:
GUILDS, and GUILD_MEMBERS for other users than the bot.
discord.js: Events.ThreadMembersUpdate.
Sourcepub const GuildCreate: GuildCreate = GuildCreate
pub const GuildCreate: GuildCreate = GuildCreate
The bot joined a guild (GUILD_CREATE of a guild it was not waiting for). Intent:
GUILDS.
Guilds from READY, and guilds back from an outage, are GuildAvailable instead
(D-223).
discord.js: Events.GuildCreate.
Sourcepub const GuildAvailable: GuildAvailable = GuildAvailable
pub const GuildAvailable: GuildAvailable = GuildAvailable
A guild became available (GUILD_CREATE of a guild from READY or back from an
outage). Intent: GUILDS.
discord.js: Events.GuildAvailable.
Sourcepub const GuildUpdate: GuildUpdate = GuildUpdate
pub const GuildUpdate: GuildUpdate = GuildUpdate
A guild was updated (GUILD_UPDATE), with the cached guild before the update. Intent:
GUILDS.
discord.js: Events.GuildUpdate (oldGuild, newGuild).
Sourcepub const GuildDelete: GuildDelete = GuildDelete
pub const GuildDelete: GuildDelete = GuildDelete
The bot left a guild, was removed, or the guild was deleted (GUILD_DELETE without
unavailable), with the cached guild. Intent: GUILDS.
discord.js: Events.GuildDelete.
A guild became unavailable because of an outage (GUILD_DELETE with unavailable),
with the cached guild; GuildAvailable follows when it is back. Intent: GUILDS.
discord.js: Events.GuildUnavailable.
Sourcepub const GuildAuditLogEntryCreate: GuildAuditLogEntryCreate = GuildAuditLogEntryCreate
pub const GuildAuditLogEntryCreate: GuildAuditLogEntryCreate = GuildAuditLogEntryCreate
An audit log entry was created (GUILD_AUDIT_LOG_ENTRY_CREATE). Intent:
GUILD_MODERATION, and the bot needs the VIEW_AUDIT_LOG permission.
discord.js: Events.GuildAuditLogEntryCreate.
Sourcepub const GuildBanAdd: GuildBanAdd = GuildBanAdd
pub const GuildBanAdd: GuildBanAdd = GuildBanAdd
A user was banned (GUILD_BAN_ADD). Intent: GUILD_MODERATION.
discord.js: Events.GuildBanAdd.
Sourcepub const GuildBanRemove: GuildBanRemove = GuildBanRemove
pub const GuildBanRemove: GuildBanRemove = GuildBanRemove
A user was unbanned (GUILD_BAN_REMOVE). Intent: GUILD_MODERATION.
discord.js: Events.GuildBanRemove.
Sourcepub const GuildEmojisUpdate: GuildEmojisUpdate = GuildEmojisUpdate
pub const GuildEmojisUpdate: GuildEmojisUpdate = GuildEmojisUpdate
A guild’s emojis changed (GUILD_EMOJIS_UPDATE): the full new list. Intent:
GUILD_EXPRESSIONS.
With emojis in the cache, GuildEmojiCreate, GuildEmojiUpdate and
GuildEmojiDelete follow for each change (D-223).
discord.js has no such event; it only emits the per-emoji ones (C-091).
Sourcepub const GuildEmojiCreate: GuildEmojiCreate = GuildEmojiCreate
pub const GuildEmojiCreate: GuildEmojiCreate = GuildEmojiCreate
An emoji was created, derived from GuildEmojisUpdate with emojis in the cache.
discord.js: Events.GuildEmojiCreate (emojiCreate).
Sourcepub const GuildEmojiUpdate: GuildEmojiUpdate = GuildEmojiUpdate
pub const GuildEmojiUpdate: GuildEmojiUpdate = GuildEmojiUpdate
An emoji was updated, derived from GuildEmojisUpdate with emojis in the cache.
discord.js: Events.GuildEmojiUpdate (emojiUpdate).
Sourcepub const GuildEmojiDelete: GuildEmojiDelete = GuildEmojiDelete
pub const GuildEmojiDelete: GuildEmojiDelete = GuildEmojiDelete
An emoji was deleted, derived from GuildEmojisUpdate with emojis in the cache.
discord.js: Events.GuildEmojiDelete (emojiDelete).
Sourcepub const GuildStickersUpdate: GuildStickersUpdate = GuildStickersUpdate
pub const GuildStickersUpdate: GuildStickersUpdate = GuildStickersUpdate
A guild’s stickers changed (GUILD_STICKERS_UPDATE): the full new list. Intent:
GUILD_EXPRESSIONS.
With stickers in the cache, GuildStickerCreate, GuildStickerUpdate and
GuildStickerDelete follow for each change (D-223).
discord.js has no such event; it only emits the per-sticker ones (C-091).
Sourcepub const GuildStickerCreate: GuildStickerCreate = GuildStickerCreate
pub const GuildStickerCreate: GuildStickerCreate = GuildStickerCreate
A sticker was created, derived from GuildStickersUpdate with stickers in the cache.
discord.js: Events.GuildStickerCreate (stickerCreate).
Sourcepub const GuildStickerUpdate: GuildStickerUpdate = GuildStickerUpdate
pub const GuildStickerUpdate: GuildStickerUpdate = GuildStickerUpdate
A sticker was updated, derived from GuildStickersUpdate with stickers in the cache.
discord.js: Events.GuildStickerUpdate (stickerUpdate).
Sourcepub const GuildStickerDelete: GuildStickerDelete = GuildStickerDelete
pub const GuildStickerDelete: GuildStickerDelete = GuildStickerDelete
A sticker was deleted, derived from GuildStickersUpdate with stickers in the cache.
discord.js: Events.GuildStickerDelete (stickerDelete).
Sourcepub const GuildIntegrationsUpdate: GuildIntegrationsUpdate = GuildIntegrationsUpdate
pub const GuildIntegrationsUpdate: GuildIntegrationsUpdate = GuildIntegrationsUpdate
A guild’s integrations changed (GUILD_INTEGRATIONS_UPDATE). Intent:
GUILD_INTEGRATIONS.
discord.js: Events.GuildIntegrationsUpdate.
Sourcepub const IntegrationCreate: IntegrationCreate = IntegrationCreate
pub const IntegrationCreate: IntegrationCreate = IntegrationCreate
An integration was created (INTEGRATION_CREATE). Intent: GUILD_INTEGRATIONS.
discord.js has no such event (C-091).
Sourcepub const IntegrationUpdate: IntegrationUpdate = IntegrationUpdate
pub const IntegrationUpdate: IntegrationUpdate = IntegrationUpdate
An integration was updated (INTEGRATION_UPDATE). Intent: GUILD_INTEGRATIONS.
discord.js has no such event (C-091).
Sourcepub const IntegrationDelete: IntegrationDelete = IntegrationDelete
pub const IntegrationDelete: IntegrationDelete = IntegrationDelete
An integration was deleted (INTEGRATION_DELETE). Intent: GUILD_INTEGRATIONS.
discord.js has no such event (C-091).
Sourcepub const GuildMemberAdd: GuildMemberAdd = GuildMemberAdd
pub const GuildMemberAdd: GuildMemberAdd = GuildMemberAdd
A user joined a guild (GUILD_MEMBER_ADD). Intent: GUILD_MEMBERS (privileged).
discord.js: Events.GuildMemberAdd.
Sourcepub const GuildMemberUpdate: GuildMemberUpdate = GuildMemberUpdate
pub const GuildMemberUpdate: GuildMemberUpdate = GuildMemberUpdate
A member was updated (GUILD_MEMBER_UPDATE), with the cached member before the update.
Intent: GUILD_MEMBERS (privileged).
discord.js: Events.GuildMemberUpdate (oldMember, newMember).
Sourcepub const GuildMemberRemove: GuildMemberRemove = GuildMemberRemove
pub const GuildMemberRemove: GuildMemberRemove = GuildMemberRemove
A user left or was removed from a guild (GUILD_MEMBER_REMOVE), with the cached
member. Intent: GUILD_MEMBERS (privileged).
discord.js: Events.GuildMemberRemove.
Sourcepub const GuildMembersChunk: GuildMembersChunk = GuildMembersChunk
pub const GuildMembersChunk: GuildMembersChunk = GuildMembersChunk
A chunk of a guild’s members (GUILD_MEMBERS_CHUNK), the answer to a
RequestGuildMembers command.
discord.js: Events.GuildMembersChunk.
Sourcepub const GuildRoleCreate: GuildRoleCreate = GuildRoleCreate
pub const GuildRoleCreate: GuildRoleCreate = GuildRoleCreate
A role was created (GUILD_ROLE_CREATE). Intent: GUILDS.
discord.js: Events.GuildRoleCreate (roleCreate).
Sourcepub const GuildRoleUpdate: GuildRoleUpdate = GuildRoleUpdate
pub const GuildRoleUpdate: GuildRoleUpdate = GuildRoleUpdate
A role was updated (GUILD_ROLE_UPDATE), with the cached role before the update.
Intent: GUILDS.
discord.js: Events.GuildRoleUpdate (roleUpdate; oldRole, newRole).
Sourcepub const GuildRoleDelete: GuildRoleDelete = GuildRoleDelete
pub const GuildRoleDelete: GuildRoleDelete = GuildRoleDelete
A role was deleted (GUILD_ROLE_DELETE), with the cached role. Intent: GUILDS.
discord.js: Events.GuildRoleDelete (roleDelete).
Sourcepub const GuildScheduledEventCreate: GuildScheduledEventCreate = GuildScheduledEventCreate
pub const GuildScheduledEventCreate: GuildScheduledEventCreate = GuildScheduledEventCreate
A scheduled event was created (GUILD_SCHEDULED_EVENT_CREATE). Intent:
GUILD_SCHEDULED_EVENTS.
discord.js: Events.GuildScheduledEventCreate.
Sourcepub const GuildScheduledEventUpdate: GuildScheduledEventUpdate = GuildScheduledEventUpdate
pub const GuildScheduledEventUpdate: GuildScheduledEventUpdate = GuildScheduledEventUpdate
A scheduled event was updated (GUILD_SCHEDULED_EVENT_UPDATE), with the cached event
before the update. Intent: GUILD_SCHEDULED_EVENTS.
discord.js: Events.GuildScheduledEventUpdate.
Sourcepub const GuildScheduledEventDelete: GuildScheduledEventDelete = GuildScheduledEventDelete
pub const GuildScheduledEventDelete: GuildScheduledEventDelete = GuildScheduledEventDelete
A scheduled event was deleted (GUILD_SCHEDULED_EVENT_DELETE), with the cached event.
Intent: GUILD_SCHEDULED_EVENTS.
discord.js: Events.GuildScheduledEventDelete.
Sourcepub const GuildScheduledEventUserAdd: GuildScheduledEventUserAdd = GuildScheduledEventUserAdd
pub const GuildScheduledEventUserAdd: GuildScheduledEventUserAdd = GuildScheduledEventUserAdd
A user subscribed to a scheduled event (GUILD_SCHEDULED_EVENT_USER_ADD). Intent:
GUILD_SCHEDULED_EVENTS.
discord.js: Events.GuildScheduledEventUserAdd.
Sourcepub const GuildScheduledEventUserRemove: GuildScheduledEventUserRemove = GuildScheduledEventUserRemove
pub const GuildScheduledEventUserRemove: GuildScheduledEventUserRemove = GuildScheduledEventUserRemove
A user unsubscribed from a scheduled event (GUILD_SCHEDULED_EVENT_USER_REMOVE).
Intent: GUILD_SCHEDULED_EVENTS.
discord.js: Events.GuildScheduledEventUserRemove.
Sourcepub const GuildSoundboardSoundCreate: GuildSoundboardSoundCreate = GuildSoundboardSoundCreate
pub const GuildSoundboardSoundCreate: GuildSoundboardSoundCreate = GuildSoundboardSoundCreate
A soundboard sound was created (GUILD_SOUNDBOARD_SOUND_CREATE). Intent:
GUILD_EXPRESSIONS.
discord.js: Events.GuildSoundboardSoundCreate.
Sourcepub const GuildSoundboardSoundUpdate: GuildSoundboardSoundUpdate = GuildSoundboardSoundUpdate
pub const GuildSoundboardSoundUpdate: GuildSoundboardSoundUpdate = GuildSoundboardSoundUpdate
A soundboard sound was updated (GUILD_SOUNDBOARD_SOUND_UPDATE), with the cached sound
before the update. Intent: GUILD_EXPRESSIONS.
discord.js: Events.GuildSoundboardSoundUpdate.
Sourcepub const GuildSoundboardSoundDelete: GuildSoundboardSoundDelete = GuildSoundboardSoundDelete
pub const GuildSoundboardSoundDelete: GuildSoundboardSoundDelete = GuildSoundboardSoundDelete
A soundboard sound was deleted (GUILD_SOUNDBOARD_SOUND_DELETE), with the cached
sound. Intent: GUILD_EXPRESSIONS.
discord.js: Events.GuildSoundboardSoundDelete.
Sourcepub const GuildSoundboardSoundsUpdate: GuildSoundboardSoundsUpdate = GuildSoundboardSoundsUpdate
pub const GuildSoundboardSoundsUpdate: GuildSoundboardSoundsUpdate = GuildSoundboardSoundsUpdate
Several soundboard sounds were updated at once (GUILD_SOUNDBOARD_SOUNDS_UPDATE).
Intent: GUILD_EXPRESSIONS.
discord.js: Events.GuildSoundboardSoundsUpdate.
Sourcepub const SoundboardSounds: SoundboardSounds = SoundboardSounds
pub const SoundboardSounds: SoundboardSounds = SoundboardSounds
A guild’s soundboard sounds (SOUNDBOARD_SOUNDS), the answer to a
RequestSoundboardSounds
command.
discord.js: Events.SoundboardSounds.
Sourcepub const StageInstanceCreate: StageInstanceCreate = StageInstanceCreate
pub const StageInstanceCreate: StageInstanceCreate = StageInstanceCreate
A stage instance was created (STAGE_INSTANCE_CREATE). Intent: GUILDS.
discord.js: Events.StageInstanceCreate.
Sourcepub const StageInstanceUpdate: StageInstanceUpdate = StageInstanceUpdate
pub const StageInstanceUpdate: StageInstanceUpdate = StageInstanceUpdate
A stage instance was updated (STAGE_INSTANCE_UPDATE), with the cached instance before
the update. Intent: GUILDS.
discord.js: Events.StageInstanceUpdate.
Sourcepub const StageInstanceDelete: StageInstanceDelete = StageInstanceDelete
pub const StageInstanceDelete: StageInstanceDelete = StageInstanceDelete
A stage instance was deleted (STAGE_INSTANCE_DELETE), with the cached instance.
Intent: GUILDS.
discord.js: Events.StageInstanceDelete.
Sourcepub const InteractionCreate: InteractionCreate = InteractionCreate
pub const InteractionCreate: InteractionCreate = InteractionCreate
A user used a command, a component or a modal (INTERACTION_CREATE).
discord.js: Events.InteractionCreate.
Sourcepub const InviteCreate: InviteCreate = InviteCreate
pub const InviteCreate: InviteCreate = InviteCreate
An invite was created (INVITE_CREATE). Intent: GUILD_INVITES.
discord.js: Events.InviteCreate.
Sourcepub const InviteDelete: InviteDelete = InviteDelete
pub const InviteDelete: InviteDelete = InviteDelete
An invite was deleted (INVITE_DELETE). Intent: GUILD_INVITES.
discord.js: Events.InviteDelete.
Sourcepub const MessageCreate: MessageCreate = MessageCreate
pub const MessageCreate: MessageCreate = MessageCreate
A message was sent (MESSAGE_CREATE). Intents: GUILD_MESSAGES, DIRECT_MESSAGES.
Guild message content needs the privileged MESSAGE_CONTENT intent.
discord.js: Events.MessageCreate.
Sourcepub const MessageUpdate: MessageUpdate = MessageUpdate
pub const MessageUpdate: MessageUpdate = MessageUpdate
A message was edited (MESSAGE_UPDATE), with the cached message before the edit.
Intents: GUILD_MESSAGES, DIRECT_MESSAGES.
discord.js: Events.MessageUpdate (oldMessage, newMessage).
Sourcepub const MessageDelete: MessageDelete = MessageDelete
pub const MessageDelete: MessageDelete = MessageDelete
A message was deleted (MESSAGE_DELETE), with the cached message. Intents:
GUILD_MESSAGES, DIRECT_MESSAGES.
discord.js: Events.MessageDelete.
Sourcepub const MessageBulkDelete: MessageBulkDelete = MessageBulkDelete
pub const MessageBulkDelete: MessageBulkDelete = MessageBulkDelete
Messages were deleted at once (MESSAGE_DELETE_BULK), with the cached ones. Intent:
GUILD_MESSAGES.
discord.js: Events.MessageBulkDelete (messageDeleteBulk).
Sourcepub const MessageReactionAdd: MessageReactionAdd = MessageReactionAdd
pub const MessageReactionAdd: MessageReactionAdd = MessageReactionAdd
A reaction was added (MESSAGE_REACTION_ADD). Intents: GUILD_MESSAGE_REACTIONS,
DIRECT_MESSAGE_REACTIONS.
discord.js: Events.MessageReactionAdd.
Sourcepub const MessageReactionRemove: MessageReactionRemove = MessageReactionRemove
pub const MessageReactionRemove: MessageReactionRemove = MessageReactionRemove
A reaction was removed (MESSAGE_REACTION_REMOVE). Intents: GUILD_MESSAGE_REACTIONS,
DIRECT_MESSAGE_REACTIONS.
discord.js: Events.MessageReactionRemove.
Sourcepub const MessageReactionRemoveAll: MessageReactionRemoveAll = MessageReactionRemoveAll
pub const MessageReactionRemoveAll: MessageReactionRemoveAll = MessageReactionRemoveAll
All reactions were removed from a message (MESSAGE_REACTION_REMOVE_ALL). Intents:
GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGE_REACTIONS.
discord.js: Events.MessageReactionRemoveAll.
Sourcepub const MessageReactionRemoveEmoji: MessageReactionRemoveEmoji = MessageReactionRemoveEmoji
pub const MessageReactionRemoveEmoji: MessageReactionRemoveEmoji = MessageReactionRemoveEmoji
All reactions with one emoji were removed (MESSAGE_REACTION_REMOVE_EMOJI). Intents:
GUILD_MESSAGE_REACTIONS, DIRECT_MESSAGE_REACTIONS.
discord.js: Events.MessageReactionRemoveEmoji.
Sourcepub const MessagePollVoteAdd: MessagePollVoteAdd = MessagePollVoteAdd
pub const MessagePollVoteAdd: MessagePollVoteAdd = MessagePollVoteAdd
A user voted in a poll (MESSAGE_POLL_VOTE_ADD). Intents: GUILD_MESSAGE_POLLS,
DIRECT_MESSAGE_POLLS.
discord.js: Events.MessagePollVoteAdd.
Sourcepub const MessagePollVoteRemove: MessagePollVoteRemove = MessagePollVoteRemove
pub const MessagePollVoteRemove: MessagePollVoteRemove = MessagePollVoteRemove
A user removed a poll vote (MESSAGE_POLL_VOTE_REMOVE). Intents: GUILD_MESSAGE_POLLS,
DIRECT_MESSAGE_POLLS.
discord.js: Events.MessagePollVoteRemove.
Sourcepub const TypingStart: TypingStart = TypingStart
pub const TypingStart: TypingStart = TypingStart
A user started typing (TYPING_START). Intents: GUILD_MESSAGE_TYPING,
DIRECT_MESSAGE_TYPING.
discord.js: Events.TypingStart.
Sourcepub const PresenceUpdate: PresenceUpdate = PresenceUpdate
pub const PresenceUpdate: PresenceUpdate = PresenceUpdate
A user’s presence changed (PRESENCE_UPDATE), with the cached presence before the
change. Intent: GUILD_PRESENCES (privileged).
discord.js: Events.PresenceUpdate (oldPresence, newPresence).
Sourcepub const UserUpdate: UserUpdate = UserUpdate
pub const UserUpdate: UserUpdate = UserUpdate
The bot’s user was updated (USER_UPDATE), with the cached user before the update.
discord.js: Events.UserUpdate (oldUser, newUser).
Sourcepub const VoiceStateUpdate: VoiceStateUpdate = VoiceStateUpdate
pub const VoiceStateUpdate: VoiceStateUpdate = VoiceStateUpdate
A user joined, left or moved between voice channels, or changed their voice state
(VOICE_STATE_UPDATE), with the cached state before the change. Intent:
GUILD_VOICE_STATES.
discord.js: Events.VoiceStateUpdate (oldState, newState).
Sourcepub const VoiceServerUpdate: VoiceServerUpdate = VoiceServerUpdate
pub const VoiceServerUpdate: VoiceServerUpdate = VoiceServerUpdate
The voice server of a guild the bot is connecting to (VOICE_SERVER_UPDATE).
discord.js: Events.VoiceServerUpdate.
Sourcepub const VoiceChannelEffectSend: VoiceChannelEffectSend = VoiceChannelEffectSend
pub const VoiceChannelEffectSend: VoiceChannelEffectSend = VoiceChannelEffectSend
A user sent an effect, such as an emoji, in a voice channel
(VOICE_CHANNEL_EFFECT_SEND). Intent: GUILD_VOICE_STATES.
discord.js: Events.VoiceChannelEffectSend.
Sourcepub const VoiceChannelStatusUpdate: VoiceChannelStatusUpdate = VoiceChannelStatusUpdate
pub const VoiceChannelStatusUpdate: VoiceChannelStatusUpdate = VoiceChannelStatusUpdate
A voice channel’s status was set or cleared (VOICE_CHANNEL_STATUS_UPDATE). Intent:
GUILDS.
discord.js has no such event (C-091).
Sourcepub const VoiceChannelStartTimeUpdate: VoiceChannelStartTimeUpdate = VoiceChannelStartTimeUpdate
pub const VoiceChannelStartTimeUpdate: VoiceChannelStartTimeUpdate = VoiceChannelStartTimeUpdate
A voice channel’s start time changed (VOICE_CHANNEL_START_TIME_UPDATE). Intent:
GUILDS.
discord.js has no such event (C-091).
Sourcepub const WebhooksUpdate: WebhooksUpdate = WebhooksUpdate
pub const WebhooksUpdate: WebhooksUpdate = WebhooksUpdate
A channel’s webhooks changed (WEBHOOKS_UPDATE). Intent: GUILD_WEBHOOKS.
discord.js: Events.WebhooksUpdate.
Sourcepub const RateLimited: RateLimited = RateLimited
pub const RateLimited: RateLimited = RateLimited
A gateway command sent by the bot was rate limited (RATE_LIMITED), for example a
RequestGuildMembers.
discord.js has no such event (C-091).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Events
impl RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnsafeUnpin for Events
impl UnwindSafe for Events
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more