name of an event() declaration. Each section below is one event: when its declarations run, the intents Discord needs for it (worked out from your files, never written by you), its options, what the bot remembers for it beyond the default, and what your function receives.
Intents are named as chapterjs dev prints them. Three are privileged, to enable in the Developer Portal: GUILD_MEMBERS is the Server Members Intent, GUILD_PRESENCES the Presence Intent, MESSAGE_CONTENT the Message Content Intent.
What each event gives
What your function receives, event by event: what the event is about, and the server it happened in (guild). Every event also receives t, in the language of that server, when the project has a language. The type after a colon is the one of that object, detailed in the section of the event; where: 'dm' and where: 'both' narrow guild as each section says.
ready
Every event also receives
t, in the language of the server it happened in, when the project has a language: see TranslationContext.
guildJoin
guildLeave
memberJoin
memberUpdate
memberLeave
roleCreate
roleUpdate
roleDelete
channelCreate
The server of the channel: Discord only sends these events, with the Guilds intent, for the channels of a server.
channelUpdate
The server of the channel: Discord only sends these events, with the Guilds intent, for the channels of a server.
channelDelete
The server of the channel: Discord only sends these events, with the Guilds intent, for the channels of a server.
messageCreate
The message that was sent. The type follows the options of the file:
MemberMessage by default, GuildMessage with bots: true, DmMessage with where: 'dm', MemberMessage | PrivateMessage with where: 'both' (GuildMessage | PrivateMessage with both options). The four are in Message.The server. With
where: 'dm' it does not exist; with where: 'both' it is null for a private message.messageUpdate
The message, as it is now. The type follows the options of the file, like for
messageCreate.The server. With
where: 'dm' it does not exist; with where: 'both' it is null for a private message.messageDelete
What a file without
where receives:
With where: 'dm', guild does not exist, and in message channel is a DMChannel | null (the private conversation, when the bot knows it), before a DmMessage | null and guildId does not exist. With where: 'both', something private comes with guild: null, so guild tells the two apart.
reactionAdd
What a file without
where receives:
With where: 'dm', guild does not exist, and in reaction channel is a DMChannel | null (the private conversation, when the bot knows it), message a DmMessage | null, and guildId and member do not exist; with 'both', a private reaction has guildId: null and member: null. With where: 'both', something private comes with guild: null, so guild tells the two apart.
reactionRemove
What a file without
where receives:
With where: 'dm', guild does not exist, and in reaction channel is a DMChannel | null (the private conversation, when the bot knows it), message a DmMessage | null, and guildId and member do not exist; with 'both', a private reaction has guildId: null and member: null. With where: 'both', something private comes with guild: null, so guild tells the two apart.
reactionClear
What a file without
where receives:
With where: 'dm', guild does not exist, and in reactions channel is a DMChannel | null (the private conversation, when the bot knows it), message a DmMessage | null and guildId does not exist. With where: 'both', something private comes with guild: null, so guild tells the two apart.
pollVoteAdd
What a file without
where receives:
With where: 'dm', guild does not exist, and in vote channel is a DMChannel | null (the private conversation, when the bot knows it), message a DmMessage | null, and guildId and member do not exist; with 'both', a private vote has guildId: null and member: null. With where: 'both', something private comes with guild: null, so guild tells the two apart.
pollVoteRemove
Receives the same as
pollVoteAdd: vote is the vote taken back.
typingStart
What a file without
where receives:
With where: 'dm', guild does not exist, and in typing channel is a DMChannel | null (the private conversation, when the bot knows it), and guildId and member do not exist; with 'both', someone typing in private has guildId: null and member: null. With where: 'both', something private comes with guild: null, so guild tells the two apart.
threadMemberJoin
threadMemberLeave
voiceJoin
voiceLeave
voiceMove
voiceUpdate
presenceUpdate
The presence as it is now, and whose it is: the fields of
UserPresence (status, activities, clientStatus), plus:guildUpdate
banAdd
banRemove
auditLogEntryCreate
What was done, by whom, on what. See
AuditLogEntry.emojiCreate
emojiUpdate
emojiDelete
inviteCreate
inviteDelete
scheduledEventCreate
The new scheduled event: see
ScheduledEvent.scheduledEventUpdate
scheduledEventDelete
scheduledEventUserAdd
scheduledEventUserRemove
When Discord only gives an id
Some events come with the id of who did it and nothing more: removing a reaction, voting, typing in private, being interested in a scheduled event. When the bot does not know that person yet, it asks Discord once before running your files, then remembers them:user is always there. Like for a channel the bot does not know, when Discord refuses, the event is not delivered and you are told: