An overview of all events in Discord.js v14 with examples.
📢 | Last updated: 1 May 2026 (v14.26.2)
ℹ️ | client references to your client instance.
ℹ️ | The v13 overview can be found here.
List of events in this overview
- applicationCommandPermissionsUpdate
- autoModerationActionExecution
- autoModerationRuleCreate
- autoModerationRuleDelete
- autoModerationRuleUpdate
- channelCreate
- channelDelete
- channelPinsUpdate
- channelUpdate
- clientReady
- debug
- emojiCreate
- emojiDelete
- emojiUpdate
- entitlementCreate
- entitlementDelete
- entitlementUpdate
- error
- guildAuditLogEntryCreate
- guildAvailable
- guildBanAdd
- guildBanRemove
- guildCreate
- guildDelete
- guildIntegrationsUpdate
- guildMemberAdd
- guildMemberAvailable
- guildMemberRemove
- guildMembersChunk
- guildMemberUpdate
- guildScheduledEventCreate
- guildScheduledEventDelete
- guildScheduledEventUpdate
- guildScheduledEventUserAdd
- guildScheduledEventUserRemove
- guildSoundboardSoundCreate
- guildSoundboardSoundDelete
- guildSoundboardSoundsUpdate
- guildSoundboardSoundUpdate
- guildUnavailable
- guildUpdate
- interactionCreate
- inviteCreate
- inviteDelete
- messageCreate
- messageDelete
- messageDeleteBulk
- messagePollVoteAdd
- messagePollVoteRemove
- messageReactionAdd
- messageReactionRemove
- messageReactionRemoveAll
- messageReactionRemoveEmoji
- messageUpdate
- presenceUpdate
- ready
- roleCreate
- roleDelete
- roleUpdate
- shardDisconnect
- shardError
- shardReady
- shardReconnecting
- shardResume
- soundboardSounds
- stageInstanceCreate
- stageInstanceDelete
- stageInstanceUpdate
- stickerCreate
- stickerDelete
- stickerUpdate
- subscriptionCreate
- subscriptionDelete
- subscriptionUpdate
- threadCreate
- threadDelete
- threadListSync
- threadMembersUpdate
- threadMemberUpdate
- threadUpdate
- typingStart
- userUpdate
- voiceChannelEffectSend
- voiceStateUpdate
- warn
- webhooksUpdate
- webhookUpdate
⚠️ | This includes permission updates for other applications in addition to the logged in client, checkdata.applicationIdto verify which application the update is for.
Emitted whenever permissions for an application command in a guild were updated.
| Parameter | Type | Description |
|---|---|---|
| data | ApplicationCommandPermissionsUpdateData | The updated permissions |
client.on('applicationCommandPermissionsUpdate', (data) => {
console.log(`applicationCommandPermissionsUpdate: ${data}`);
});ℹ️ | This event requires the
AutoModerationConfigurationpermission.
Emitted whenever an auto moderation rule is triggered.
| Parameter | Type | Description |
|---|---|---|
| autoModerationActionExecution | AutoModerationActionExecution | The auto moderation action execution |
client.on('autoModerationActionExecution', (autoModerationActionExecution) => {
console.log(`autoModerationActionExecution: ${autoModerationActionExecution}`);
});ℹ️ | This event requires the
AutoModerationConfigurationpermission.
Emitted whenever an auto moderation rule is created.
| Parameter | Type | Description |
|---|---|---|
| autoModerationRule | AutoModerationRule | The created auto moderation rule |
client.on('autoModerationRuleCreate', (autoModerationRule) => {
console.log(`autoModerationRuleCreate: ${autoModerationRule}`);
});ℹ️ | This event requires the
AutoModerationConfigurationpermission.
Emitted whenever an auto moderation rule is deleted.
| Parameter | Type | Description |
|---|---|---|
| autoModerationRule | AutoModerationRule | The deleted auto moderation rule |
client.on('autoModerationRuleDelete', (autoModerationRule) => {
console.log(`autoModerationRuleDelete: ${autoModerationRule}`);
});ℹ️ | This event requires the
AutoModerationConfigurationpermission.
Emitted whenever an auto moderation rule gets updated.
| Parameter | Type | Description |
|---|---|---|
| oldAutoModerationRule | AutoModerationRule | null | The auto moderation rule before the update |
| newAutoModerationRule | AutoModerationRule | The auto moderation rule after the update |
client.on('autoModerationRuleUpdate', (oldAutoModerationRule, newAutoModerationRule) => {
console.log(`autoModerationRuleUpdate: ${oldAutoModerationRule} | ${newAutoModerationRule}`);
});Emitted whenever a guild channel is created.
| Parameter | Type | Description |
|---|---|---|
| channel | GuildChannel | The channel that was created |
client.on('channelCreate', (channel) => {
console.log(`channelCreate: ${channel}`);
});Emitted whenever a channel is deleted.
| Parameter | Type | Description |
|---|---|---|
| channel | DMChannel | GuildChannel | The channel that was deleted |
client.on('channelDelete', (channel) => {
console.log(`channelDelete: ${channel}`);
});Emitted whenever the pins of a channel are updated. Due to the nature of the WebSocket event, not much information can be provided easily here - you need to manually check the pins yourself.
| Parameter | Type | Description |
|---|---|---|
| channel | TextBasedChannels | The channel that the pins update occurred in |
| time | Date | The time of the pins update |
client.on('channelPinsUpdate', (channel, time) => {
console.log(`channelPinsUpdate: ${channel} | ${time}`);
});Emitted whenever a channel is updated - e.g. name change, topic change, channel type change.
| Parameter | Type | Description |
|---|---|---|
| oldChannel | DMChannel | GuildChannel | The channel before the update |
| newChannel | DMChannel | GuildChannel | The channel after the update |
client.on('channelUpdate', (oldChannel, newChannel) => {
console.log(`channelUpdate: ${oldChannel} | ${newChannel}`);
});Emitted when the client becomes ready to start working.
| Parameter | Type | Description |
|---|---|---|
| client | Client | The client |
client.on('clientReady', (client) => {
console.log(`clientReady: ${client.user.tag}`);
});Emitted for general debugging information.
| Parameter | Type | Description |
|---|---|---|
| info | string | The debug info |
client.on('debug', (info) => {
console.log(`debug: ${info}`);
});Emitted whenever a custom emoji is created in a guild.
| Parameter | Type | Description |
|---|---|---|
| emoji | GuildEmoji | The emoji that was created |
client.on('emojiCreate', (emoji) => {
console.log(`emojiCreate: ${emoji}`);
});Emitted whenever a custom emoji is deleted in a guild.
| Parameter | Type | Description |
|---|---|---|
| emoji | GuildEmoji | The emoji that was deleted |
client.on('emojiDelete', (emoji) => {
console.log(`emojiDelete: ${emoji}`);
});Emitted whenever a custom emoji is updated in a guild.
| Parameter | Type | Description |
|---|---|---|
| oldEmoji | GuildEmoji | The old emoji |
| newEmoji | GuildEmoji | The new emoji |
client.on('emojiUpdate', (oldEmoji, newEmoji) => {
console.log(`emojiUpdate: ${oldEmoji} | ${newEmoji}`);
});Emitted whenever an entitlement is created.
| Parameter | Type | Description |
|---|---|---|
| entitlement | Entitlement | The entitlement that was created |
client.on('entitlementCreate', (entitlement) => {
console.log(`entitlementCreate: ${entitlement}`);
});Emitted whenever an entitlement is deleted. Entitlements are not deleted when they expire. This is only triggered when Discord issues a refund or deletes the entitlement manually.
| Parameter | Type | Description |
|---|---|---|
| entitlement | Entitlement | The entitlement that was deleted |
client.on('entitlementDelete', (entitlement) => {
console.log(`entitlementDelete: ${entitlement}`);
});Emitted whenever an entitlement is updated - i.e. when a user's subscription renews.
| Parameter | Type | Description |
|---|---|---|
| oldEntitlement | Entitlement | null | The entitlement before the update |
| newEntitlement | Entitlement | The entitlement after the update |
client.on('entitlementUpdate', (oldEntitlement, newEntitlement) => {
console.log(`entitlementUpdate: ${oldEntitlement} | ${newEntitlement}`);
});Emitted when the client encounters an error. Errors thrown within this event do not have a catch handler; it is recommended not to use async functions as error event handlers.
| Parameter | Type | Description |
|---|---|---|
| error | Error | The error that was encountered |
client.on('error', (error) => {
console.log(`error: ${error}`);
});Emitted whenever a guild audit log entry is created.
| Parameter | Type | Description |
|---|---|---|
| auditLogEntry | GuildAuditLogsEntry | The audit log entry that was created |
| guild | Guild | The guild where the audit log entry was created |
client.on('guildAuditLogEntryCreate', (auditLogEntry, guild) => {
console.log(`guildAuditLogEntryCreate: ${auditLogEntry} | ${guild}`);
});Emitted whenever a guild becomes available.
| Parameter | Type | Description |
|---|---|---|
| guild | Guild | The guild that became available |
client.on('guildAvailable', (guild) => {
console.log(`guildAvailable: ${guild}`);
});Emitted whenever a member is banned from a guild.
| Parameter | Type | Description |
|---|---|---|
| ban | GuildBan | The ban that occurred |
client.on('guildBanAdd', (ban) => {
console.log(`guildBanAdd: ${ban}`);
});Emitted whenever a member is unbanned from a guild.
| Parameter | Type | Description |
|---|---|---|
| ban | GuildBan | The ban that was removed |
client.on('guildBanRemove', (ban) => {
console.log(`guildBanRemove: ${ban}`);
});Emitted whenever the client joins a guild.
| Parameter | Type | Description |
|---|---|---|
| guild | Guild | The created guild |
client.on('guildCreate', (guild) => {
console.log(`guildCreate: ${guild}`);
});Emitted whenever a guild kicks the client or the guild is deleted/left.
| Parameter | Type | Description |
|---|---|---|
| guild | Guild | The guild that was deleted |
client.on('guildDelete', (guild) => {
console.log(`guildDelete: ${guild}`);
});Emitted whenever a guild integration is updated.
| Parameter | Type | Description |
|---|---|---|
| guild | Guild | The guild whose integrations were updated |
client.on('guildIntegrationsUpdate', (guild) => {
console.log(`guildIntegrationsUpdate: ${guild}`);
});Emitted whenever a user joins a guild.
| Parameter | Type | Description |
|---|---|---|
| member | GuildMember | The member that has joined a guild |
client.on('guildMemberAdd', (member) => {
console.log(`guildMemberAdd: ${member}`);
});Emitted whenever a member becomes available.
| Parameter | Type | Description |
|---|---|---|
| member | GuildMember | The member that became available |
client.on('guildMemberAvailable', (member) => {
console.log(`guildMemberAvailable: ${member}`);
});Emitted whenever a member leaves a guild, or is kicked.
| Parameter | Type | Description |
|---|---|---|
| member | GuildMember | The member that has left/been kicked from the guild |
client.on('guildMemberRemove', (member) => {
console.log(`guildMemberRemove: ${member}`);
});Emitted whenever a chunk of guild members is received (all members come from the same guild).
| Parameter | Type | Description |
|---|---|---|
| members | Collection<Snowflake, GuildMember> | The members in the chunk |
| guild | Guild | The guild related to the member chunk |
| chunk | GuildMembersChunk | Properties of the received chunk |
client.on('guildMembersChunk', (members, guild, chunk) => {
console.log(`guildMembersChunk: ${members} | ${guild} | ${chunk}`);
});Emitted whenever a guild member changes - i.e. new role, removed role, nickname.
| Parameter | Type | Description |
|---|---|---|
| oldMember | GuildMember | The member before the update |
| newMember | GuildMember | The member after the update |
client.on('guildMemberUpdate', (oldMember, newMember) => {
console.log(`guildMemberUpdate: ${oldMember} | ${newMember}`);
});Emitted whenever a guild scheduled event is created.
| Parameter | Type | Description |
|---|---|---|
| guildScheduledEvent | GuildScheduledEvent | The created guild scheduled event |
client.on('guildScheduledEventCreate', (guildScheduledEvent) => {
console.log(`guildScheduledEventCreate: ${guildScheduledEvent}`);
});Emitted whenever a guild scheduled event is deleted.
| Parameter | Type | Description |
|---|---|---|
| guildScheduledEvent | GuildScheduledEvent | The deleted guild scheduled event |
client.on('guildScheduledEventDelete', (guildScheduledEvent) => {
console.log(`guildScheduledEventDelete: ${guildScheduledEvent}`);
});Emitted whenever a guild scheduled event gets updated.
| Parameter | Type | Description |
|---|---|---|
| oldGuildScheduledEvent | GuildScheduledEvent | null | The guild scheduled event before the update |
| newGuildScheduledEvent | GuildScheduledEvent | The guild scheduled event after the update |
client.on('guildScheduledEventUpdate', (oldGuildScheduledEvent, newGuildScheduledEvent) => {
console.log(`guildScheduledEventUpdate: ${oldGuildScheduledEvent} | ${newGuildScheduledEvent}`);
});Emitted whenever a user subscribes to a guild scheduled event.
| Parameter | Type | Description |
|---|---|---|
| guildScheduledEvent | GuildScheduledEvent | The guild scheduled event |
| user | User | The user who subscribed |
client.on('guildScheduledEventUserAdd', (guildScheduledEvent, user) => {
console.log(`guildScheduledEventUserAdd: ${guildScheduledEvent} | ${user}`);
});Emitted whenever a user unsubscribes from a guild scheduled event.
| Parameter | Type | Description |
|---|---|---|
| guildScheduledEvent | GuildScheduledEvent | The guild scheduled event |
| user | User | The user who unsubscribed |
client.on('guildScheduledEventUserRemove', (guildScheduledEvent, user) => {
console.log(`guildScheduledEventUserRemove: ${guildScheduledEvent} | ${user}`);
});Emitted whenever a guild soundboard sound is created.
| Parameter | Type | Description |
|---|---|---|
| soundboardSound | SoundboardSound | The soundboard sound that was created |
client.on('guildSoundboardSoundCreate', (soundboardSound) => {
console.log(`guildSoundboardSoundCreate: ${soundboardSound}`);
});Emitted whenever a soundboard sound is deleted in a guild.
| Parameter | Type | Description |
|---|---|---|
| soundboardSound | SoundboardSound | The soundboard sound that was deleted |
client.on('guildSoundboardSoundDelete', (soundboardSound) => {
console.log(`guildSoundboardSoundDelete: ${soundboardSound}`);
});Emitted whenever multiple guild soundboard sounds are updated.
| Parameter | Type | Description |
|---|---|---|
| soundboardSounds | Collection<Snowflake, SoundboardSound> | The updated soundboard sounds |
| guild | Guild | The guild whose soundboard sounds were updated |
client.on('guildSoundboardSoundsUpdate', (soundboardSounds, guild) => {
console.log(`guildSoundboardSoundsUpdate: ${soundboardSounds} | ${guild}`);
});Emitted whenever a guild soundboard sound is updated.
| Parameter | Type | Description |
|---|---|---|
| oldGuildSoundboardSound | SoundboardSound | null | The soundboard sound before the update |
| newGuildSoundboardSound | SoundboardSound | The soundboard sound after the update |
client.on('guildSoundboardSoundUpdate', (oldGuildSoundboardSound, newGuildSoundboardSound) => {
console.log(`guildSoundboardSoundUpdate: ${oldGuildSoundboardSound} | ${newGuildSoundboardSound}`);
});Emitted whenever a guild becomes unavailable, likely due to a server outage.
| Parameter | Type | Description |
|---|---|---|
| guild | Guild | The guild that has become unavailable |
client.on('guildUnavailable', (guild) => {
console.log(`guildUnavailable: ${guild}`);
});Emitted whenever a guild is updated - e.g. name change.
| Parameter | Type | Description |
|---|---|---|
| oldGuild | Guild | The guild before the update |
| newGuild | Guild | The guild after the update |
client.on('guildUpdate', (oldGuild, newGuild) => {
console.log(`guildUpdate: ${oldGuild} | ${newGuild}`);
});Emitted when an interaction is created.
| Parameter | Type | Description |
|---|---|---|
| interaction | BaseInteraction | The interaction which was created |
client.on('interactionCreate', (interaction) => {
console.log(`interactionCreate: ${interaction}`);
});ℹ️ | This event only triggers if the client has
MANAGE_CHANNELSpermissions for the channel.
Emitted when an invite is created.
| Parameter | Type | Description |
|---|---|---|
| invite | Invite | The invite that was created |
client.on('inviteCreate', (invite) => {
console.log(`inviteCreate: ${invite}`);
});ℹ️ | This event only triggers if the client has
MANAGE_CHANNELSpermissions for the channel.
Emitted when an invite is deleted.
| Parameter | Type | Description |
|---|---|---|
| invite | Invite | The invite that was deleted |
client.on('inviteDelete', (invite) => {
console.log(`inviteDelete: ${invite}`);
});Emitted whenever a message is created.
| Parameter | Type | Description |
|---|---|---|
| message | Message | The created message |
client.on('messageCreate', (message) => {
console.log(`messageCreate: ${message}`);
});Emitted whenever a message is deleted.
| Parameter | Type | Description |
|---|---|---|
| message | Message | The deleted message |
client.on('messageDelete', (message) => {
console.log(`messageDelete: ${message}`);
});Emitted whenever messages are deleted in bulk.
| Parameter | Type | Description |
|---|---|---|
| messages | Collection<Snowflake, Message> | The deleted messages, mapped by their id |
| channel | GuildTextBasedChannel | The channel the messages were deleted in |
client.on('messageDeleteBulk', (messages, channel) => {
console.log(`messageDeleteBulk: ${messages} | ${channel}`);
});Emitted whenever a user votes in a poll.
| Parameter | Type | Description |
|---|---|---|
| pollAnswer | PollAnswer | The poll answer that was voted on |
| userId | Snowflake | The id of the user who voted |
client.on('messagePollVoteAdd', (pollAnswer, userId) => {
console.log(`messagePollVoteAdd: ${pollAnswer} | ${userId}`);
});Emitted whenever a user removes their vote in a poll.
| Parameter | Type | Description |
|---|---|---|
| pollAnswer | PollAnswer | The poll answer the vote was removed from |
| userId | Snowflake | The id of the user who removed their vote |
client.on('messagePollVoteRemove', (pollAnswer, userId) => {
console.log(`messagePollVoteRemove: ${pollAnswer} | ${userId}`);
});Emitted whenever a reaction is added to a cached message.
| Parameter | Type | Description |
|---|---|---|
| messageReaction | MessageReaction | The reaction object |
| user | User | The user that applied the guild or reaction emoji |
| details | MessageReactionEventDetails | Details about the reaction event |
client.on('messageReactionAdd', (reaction, user, details) => {
console.log(`messageReactionAdd: ${reaction} | ${user} | ${details}`);
});Emitted whenever a reaction is removed from a cached message.
| Parameter | Type | Description |
|---|---|---|
| messageReaction | MessageReaction | The reaction object |
| user | User | The user whose emoji or reaction emoji was removed |
| details | MessageReactionEventDetails | Details about the reaction event |
client.on('messageReactionRemove', (reaction, user, details) => {
console.log(`messageReactionRemove: ${reaction} | ${user} | ${details}`);
});Emitted whenever all reactions are removed from a cached message.
| Parameter | Type | Description |
|---|---|---|
| message | Message | The message the reactions were removed from |
| reactions | Collection<string | Snowflake, MessageReaction> | The cached message reactions that were removed |
client.on('messageReactionRemoveAll', (message, reactions) => {
console.log(`messageReactionRemoveAll: ${message} | ${reactions}`);
});Emitted when a bot removes an emoji reaction from a cached message.
| Parameter | Type | Description |
|---|---|---|
| reaction | MessageReaction | The reaction that was removed |
client.on('messageReactionRemoveEmoji', (reaction) => {
console.log(`messageReactionRemoveEmoji: ${reaction}`);
});Emitted whenever a message is updated - e.g. embed or content change.
| Parameter | Type | Description |
|---|---|---|
| oldMessage | Message | The message before the update |
| newMessage | Message | The message after the update |
client.on('messageUpdate', (oldMessage, newMessage) => {
console.log(`messageUpdate: ${oldMessage} | ${newMessage}`);
});Emitted whenever a guild member's presence (e.g. status, activity) is changed.
| Parameter | Type | Description |
|---|---|---|
| oldPresence | Presence | null | The presence before the update, if one at all |
| newPresence | Presence | The presence after the update |
client.on('presenceUpdate', (oldPresence, newPresence) => {
console.log(`presenceUpdate: ${oldPresence} | ${newPresence}`);
});
⚠️ | Deprecated. Use clientReady instead.
Emitted when the client becomes ready to start working.
| Parameter | Type | Description |
|---|---|---|
| client | Client | The client |
client.on('ready', (client) => {
console.log(`ready: ${client.user.tag}`);
});Emitted whenever a role is created.
| Parameter | Type | Description |
|---|---|---|
| role | Role | The role that was created |
client.on('roleCreate', (role) => {
console.log(`roleCreate: ${role}`);
});Emitted whenever a guild role is deleted.
| Parameter | Type | Description |
|---|---|---|
| role | Role | The role that was deleted |
client.on('roleDelete', (role) => {
console.log(`roleDelete: ${role}`);
});Emitted whenever a guild role is updated.
| Parameter | Type | Description |
|---|---|---|
| oldRole | Role | The role before the update |
| newRole | Role | The role after the update |
client.on('roleUpdate', (oldRole, newRole) => {
console.log(`roleUpdate: ${oldRole} | ${newRole}`);
});Emitted when a shard's WebSocket disconnects and will no longer reconnect.
| Parameter | Type | Description |
|---|---|---|
| event | CloseEvent | The WebSocket close event |
| id | number | The shard id that disconnected |
client.on('shardDisconnect', (event, id) => {
console.log(`shardDisconnect: ${event} | ${id}`);
});Emitted whenever a shard's WebSocket encounters a connection error.
| Parameter | Type | Description |
|---|---|---|
| error | Error | The encountered error |
| shardId | number | The shard that encountered this error |
client.on('shardError', (error, shardId) => {
console.log(`shardError: ${error} | ${shardId}`);
});Emitted when a shard turns ready.
| Parameter | Type | Description |
|---|---|---|
| id | number | The shard id that turned ready |
| unavailableGuilds | Set<Snowflake> | null | Set of unavailable guild ids, if any |
client.on('shardReady', (id, unavailableGuilds) => {
console.log(`shardReady: ${id} | ${unavailableGuilds}`);
});Emitted when a shard is attempting to reconnect or re-identify.
| Parameter | Type | Description |
|---|---|---|
| id | number | The shard id that is attempting to reconnect |
client.on('shardReconnecting', (id) => {
console.log(`shardReconnecting: ${id}`);
});Emitted when a shard resumes successfully.
| Parameter | Type | Description |
|---|---|---|
| id | number | The shard id that resumed |
| replayedEvents | number | The amount of replayed events |
client.on('shardResume', (id, replayedEvents) => {
console.log(`shardResume: ${id} | ${replayedEvents}`);
});Emitted whenever soundboard sounds are received (all soundboard sounds come from the same guild).
| Parameter | Type | Description |
|---|---|---|
| soundboardSounds | Collection<Snowflake, SoundboardSound> | The received soundboard sounds |
| guild | Guild | The guild the soundboard sounds come from |
client.on('soundboardSounds', (soundboardSounds, guild) => {
console.log(`soundboardSounds: ${soundboardSounds} | ${guild}`);
});Emitted whenever a stage instance is created.
| Parameter | Type | Description |
|---|---|---|
| stageInstance | StageInstance | The created stage instance |
client.on('stageInstanceCreate', (stageInstance) => {
console.log(`stageInstanceCreate: ${stageInstance}`);
});Emitted whenever a stage instance is deleted.
| Parameter | Type | Description |
|---|---|---|
| stageInstance | StageInstance | The deleted stage instance |
client.on('stageInstanceDelete', (stageInstance) => {
console.log(`stageInstanceDelete: ${stageInstance}`);
});Emitted whenever a stage instance gets updated - e.g. change in topic or privacy level.
| Parameter | Type | Description |
|---|---|---|
| oldStageInstance | StageInstance | null | The stage instance before the update |
| newStageInstance | StageInstance | The stage instance after the update |
client.on('stageInstanceUpdate', (oldStageInstance, newStageInstance) => {
console.log(`stageInstanceUpdate: ${oldStageInstance} | ${newStageInstance}`);
});Emitted whenever a custom sticker is created in a guild.
| Parameter | Type | Description |
|---|---|---|
| sticker | Sticker | The sticker that was created |
client.on('stickerCreate', (sticker) => {
console.log(`stickerCreate: ${sticker}`);
});Emitted whenever a custom sticker is deleted in a guild.
| Parameter | Type | Description |
|---|---|---|
| sticker | Sticker | The sticker that was deleted |
client.on('stickerDelete', (sticker) => {
console.log(`stickerDelete: ${sticker}`);
});Emitted whenever a custom sticker is updated in a guild.
| Parameter | Type | Description |
|---|---|---|
| oldSticker | Sticker | The sticker before the update |
| newSticker | Sticker | The sticker after the update |
client.on('stickerUpdate', (oldSticker, newSticker) => {
console.log(`stickerUpdate: ${oldSticker} | ${newSticker}`);
});Emitted whenever a subscription is created.
| Parameter | Type | Description |
|---|---|---|
| subscription | Subscription | The subscription that was created |
client.on('subscriptionCreate', (subscription) => {
console.log(`subscriptionCreate: ${subscription}`);
});Emitted whenever a subscription is deleted.
| Parameter | Type | Description |
|---|---|---|
| subscription | Subscription | The subscription that was deleted |
client.on('subscriptionDelete', (subscription) => {
console.log(`subscriptionDelete: ${subscription}`);
});Emitted whenever a subscription is updated - i.e. when a user's subscription renews.
| Parameter | Type | Description |
|---|---|---|
| oldSubscription | Subscription | null | The subscription before the update |
| newSubscription | Subscription | The subscription after the update |
client.on('subscriptionUpdate', (oldSubscription, newSubscription) => {
console.log(`subscriptionUpdate: ${oldSubscription} | ${newSubscription}`);
});Emitted whenever a thread is created or when the client user is added to a thread.
| Parameter | Type | Description |
|---|---|---|
| thread | ThreadChannel | The thread that was created |
| newlyCreated | boolean | Whether the thread was newly created |
client.on('threadCreate', (thread, newlyCreated) => {
console.log(`threadCreate: ${thread} | ${newlyCreated}`);
});Emitted whenever a thread is deleted.
| Parameter | Type | Description |
|---|---|---|
| thread | ThreadChannel | The thread that was deleted |
client.on('threadDelete', (thread) => {
console.log(`threadDelete: ${thread}`);
});Emitted whenever the client user gains access to a text or news channel that contains threads.
| Parameter | Type | Description |
|---|---|---|
| threads | Collection<Snowflake, ThreadChannel> | The threads that were synced |
| guild | Guild | The guild where the threads were synced |
client.on('threadListSync', (threads, guild) => {
console.log(`threadListSync: ${threads} | ${guild}`);
});Emitted whenever members are added or removed from a thread.
| Parameter | Type | Description |
|---|---|---|
| addedMembers | Collection<Snowflake, ThreadMember> | The members that were added |
| removedMembers | Collection<Snowflake, ThreadMember> | The members that were removed |
| thread | ThreadChannel | The thread the members were updated in |
client.on('threadMembersUpdate', (addedMembers, removedMembers, thread) => {
console.log(`threadMembersUpdate: ${addedMembers} | ${removedMembers} | ${thread}`);
});Emitted whenever the client user's thread member is updated.
| Parameter | Type | Description |
|---|---|---|
| oldMember | ThreadMember | The member before the update |
| newMember | ThreadMember | The member after the update |
client.on('threadMemberUpdate', (oldMember, newMember) => {
console.log(`threadMemberUpdate: ${oldMember} | ${newMember}`);
});Emitted whenever a thread is updated - e.g. name change, archive state change, locked state change.
| Parameter | Type | Description |
|---|---|---|
| oldThread | ThreadChannel | The thread before the update |
| newThread | ThreadChannel | The thread after the update |
client.on('threadUpdate', (oldThread, newThread) => {
console.log(`threadUpdate: ${oldThread} | ${newThread}`);
});Emitted whenever a user starts typing in a channel.
| Parameter | Type | Description |
|---|---|---|
| typing | Typing | The typing state |
client.on('typingStart', (typing) => {
console.log(`typingStart: ${typing}`);
});ℹ️ | Triggered by the Discord gateway events
UserUpdate,GuildMemberUpdate, andPresenceUpdate.
Emitted whenever a user's details (e.g. username) are changed.
| Parameter | Type | Description |
|---|---|---|
| oldUser | User | The user before the update |
| newUser | User | The user after the update |
client.on('userUpdate', (oldUser, newUser) => {
console.log(`userUpdate: ${oldUser} | ${newUser}`);
});Emitted when someone sends an effect, such as an emoji reaction, in a voice channel the client is connected to.
| Parameter | Type | Description |
|---|---|---|
| voiceChannelEffect | VoiceChannelEffect | The voice channel effect that was sent |
client.on('voiceChannelEffectSend', (voiceChannelEffect) => {
console.log(`voiceChannelEffectSend: ${voiceChannelEffect}`);
});Emitted whenever a member changes voice state - e.g. joins/leaves a channel, mutes/unmutes.
| Parameter | Type | Description |
|---|---|---|
| oldState | VoiceState | The voice state before the update |
| newState | VoiceState | The voice state after the update |
client.on('voiceStateUpdate', (oldState, newState) => {
console.log(`voiceStateUpdate: ${oldState} | ${newState}`);
});Emitted for general warnings.
| Parameter | Type | Description |
|---|---|---|
| info | string | The warning |
client.on('warn', (info) => {
console.log(`warn: ${info}`);
});Emitted whenever a channel has its webhooks changed.
| Parameter | Type | Description |
|---|---|---|
| channel | TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | MediaChannel | The channel that had a webhook update |
client.on('webhooksUpdate', (channel) => {
console.log(`webhooksUpdate: ${channel}`);
});
⚠️ | Deprecated. Use webhooksUpdate instead.
Emitted whenever a channel has its webhooks changed.
| Parameter | Type | Description |
|---|---|---|
| channel | TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | MediaChannel | The channel that had a webhook update |
client.on('webhookUpdate', (channel) => {
console.log(`webhookUpdate: ${channel}`);
});
So useful, thanks!