banAdd events run:
src/events/log.ts
guild is always there, and none of them has options.
Every event of this page, with what it gives, is in the reference.
Moderation
banAdd runs when someone is banned, banRemove when a ban is lifted; both give user and guild. A banned member also leaves the server, so a file of memberLeave runs too.
To know who banned, kicked or changed something, listen to the audit log: auditLogEntryCreate runs for every entry Discord adds to it, and gives it as an AuditLogEntry. Discord only sends it to a bot with the ViewAuditLog permission.
src/events/kicks.ts
actionType are the ones of AuditLogEvent.
The server, its emojis and its invites
guildUpdateruns when the server changes (name, icon, settings), withguildas it is now.emojiCreate,emojiUpdateandemojiDeleterun for each emoji added, changed or removed.emojiDeletegives the emoji as it was.inviteCreategives the newInviteand the channel it leads to;inviteDeletethe code of an invite deleted or expired. Discord only sends them to a bot with theManageChannelspermission on that channel.
src/events/log.ts
Scheduled events
scheduledEventCreate, scheduledEventUpdate and scheduledEventDelete give the ScheduledEvent. scheduledEventUserAdd and scheduledEventUserRemove run when someone says they are interested, or no longer are.
src/events/announce.ts
Threads
A thread created, changed or deleted is a channel:channelCreate, channelUpdate and channelDelete run for it. Who is in a thread has two events of its own: threadMemberJoin (with thread and member) and threadMemberLeave (with thread and userId; member when the bot remembers them), both with guild.
src/events/hello.ts
Presences
presenceUpdate runs when someone’s status or activity changes: online, idle, playing a game. presence has the fields of a UserPresence (status, activities, clientStatus), plus whose it is: userId, and user and member when the bot knows them.
src/events/games.ts
Intents
Each group of events has its intent, and ChapterJS only asks for the ones your files need:Events reference
Every field of every event.
Guild
Everything a server has, and what your bot can do with it.