This is a test to compare the data received on events between discord.js-light v4 and discord.js v13 with the new option to limit caches.
All tests have been done with all intents and partials enabled.
You can see the code used in index.js
.
Disabling the guild cache in discord.js results in the majority of events not being emitted or errors occurring, so this does not take that into account.
Event | Emits in djs-light | Notes in djs-light | Emits in djs | Notes in djs | Managers with cache at 0 |
---|---|---|---|---|---|
channelCreate | channel | channel | ChannelManager, GuildChannelManager | ||
channelDelete | channel | channel? | Only emits if channels are cached. | ChannelManager, GuildChannelManager | |
channelPinsUpdate | channel, time | Partial channel if not cached. | channel?, time? | Only emits if channels are cached | ChannelManager, GuildChannelManager |
channelUpdate | oldChannel, newChannel | oldChannel partial if not cached. | oldChannel?, newChannel? | Only emits if channels are cached. | ChannelManager, GuildChannelManager |
emojiCreate | emoji | Instead it emits guildEmojisUpdate. | emoji | If GuildEmojiManager is disabled, it is emitted with every emoji on the server and not only with the new emoji. | BaseGuildEmojiManager |
emojiDelete | emoji | Instead it emits guildEmojisUpdate. | emoji | If GuildEmojiManager is disabled it is not emitted, instead emits emojiCreate for each emoji that has not been deleted. | BaseGuildEmojiManager |
emojiUpdate | oldEmoji, newEmoji | Instead it emits guildEmojisUpdate. | oldEmoji, newEmoji | If GuildEmojiManager is disabled it is not emitted, instead it emits emojiCreate with the new emoji data. | BaseGuildEmojiManager |
guildBanAdd | ban | Is partial and only includes guild and user data. | ban | Is partial and only includes guild and user data. | GuildBanManager |
guildBanRemove | ban | Is partial and only includes guild and user data. | ban | Is partial and only includes guild and user data. | GuildBanManager |
guildCreate | guild | guild | GuildManager | ||
guildDelete | guild | Partial guild if not cached. | guild? | Only emits if guilds are cached. | GuildManager |
guildIntegrationsUpdate | guild | I don't know how to test this. | guild | I don't know how to test this. | - |
guildMemberAdd | member | Member sometimes is partial. | member | Crashes if RoleManager is also disabled. | GuildMemberManager |
guildMemberRemove | member | Partial member if not cached. | member | Partial member if not cached. Crashes if RoleManager is also disabled. | GuildMemberManager |
guildMemberUpdate | oldMember, newMember | oldMember partial if not cached. | oldMember, newMember | oldMember is partial if not cached. Crashes if RoleManager is also disabled. | GuildMemberManager |
guildUpdate | oldGuild, newGuild | oldGuild partial if not cached. | oldGuild?, newGuild? | Only emits if guilds are cached. | GuildManager |
interactionCreate | interaction | - | interaction | - | - |
inviteCreate | invite | invite | Only emits if channels are cached. | GuildInviteManager | |
inviteDelete | invite | Partial invite. | invite | Only emits if channels are cached. | GuildInviteManager |
messageCreate | message | message? | Only emits if messages, channels and guilds are cached. | MessageManager | |
messageDelete | message | Partial message if not cached. | message | Partial message if not cached, only emits if the channel is cached. | MessageManager |
messageDeleteBulk | messages | Collection of deleted messages or partial messages as above. | messages | Collection of deleted messages or partial messages as above, only emits if the channel is cached. | MessageManager |
messageReactionAdd | reaction, user | Partial reaction, partial user sometimes. | reaction, user | Partial reaction, partial user if not cached. Only emits if channels are cached. | ReactionManager, ReactionUserManager |
messageReactionRemove | reaction, user | Partial reaction, partial user sometimes. | reaction, user | Partial reaction, partial user if not cached. Only emits if channels are cached. | ReactionManager, ReactionUserManager |
messageReactionRemoveAll | message | Partial message always. | message | Partial message always. Only emits if channels are cached. | ReactionManager, ReactionUserManager |
messageReactionRemoveEmoji | reaction | Partial reaction. | reaction | Partial reaction. Only emits if channels are cached. | ReactionManager, ReactionUserManager |
messageUpdate | oldMessage, newMessage | oldMessage partial if not cached. | oldMessage?, newMessage | Only emits if channels are cached. | MessageManager |
presenceUpdate | oldPresence, newPresence | oldPresence partial if member not cached. | oldPresence, newPresence | Only emits if guild members and users are cached. | PresenceManager |
roleCreate | role | role | RoleManager | ||
roleDelete | role | Partial role if not cached. | role? | Only emits if roles are cached. | RoleManager |
roleUpdate | oldRole, newRole | oldRole partial if not cached. | oldRole?, newRole? | Only emits if roles are cached. | RoleManager |
stageInstanceCreate | stageInstance | stageInstance | - | StageInstanceManager | |
stageInstanceDelete | stageInstance | stageInstance | - | StageInstanceManager | |
stageInstanceUpdate | oldStageInstance, newStageInstance | oldStageInstance partial if not cached. | oldStageInstance, newStageInstance | - | StageInstanceManager |
stickerCreate | sticker | Instead it emits guildStickersUpdate. | sticker | - | GuildStickerManager |
stickerDelete | sticker | Instead it emits guildStickersUpdate. | sticker | - | GuildStickerManager |
stickerUpdate | oldSticker, newSticker | Instead it emits guildStickersUpdate. | oldSticker, newSticker | - | GuildStickerManager |
threadCreate | thread | thread | - | ThreadManager | |
threadDelete | thread | Partial thread if not cached. | thread | - | ThreadManager |
threadListSync | threads | threads | - | ThreadManager | |
threadMembersUpdate | oldMembers, newMembers | oldMembers, newMembers | - | ThreadManager, ThreadMemberManager | |
threadMemberUpdate | oldMember, newMember | oldMember, newMember | - | ThreadManager, ThreadMemberManager | |
threadUpdate | oldThread, newThread | oldThread partial if not cached. | oldThread, newThread | - | ThreadManager |
typingStart | typing | typing | Only emits if channels are cached. | - | |
userUpdate | oldUser, newUser | oldUser partial if not cached. | oldUser?, newUser? | Crashes if the user is not cached. See issue #6290. | UserManager, GuildMemberManager |
voiceStateUpdate | oldState, newState | oldState, newState | Includes some partial data. | VoiceStateManager | |
webhookUpdate | channel | Partial channel if not cached. | channel | Only emits if channels are cached. | - |