#[non_exhaustive]pub enum Resource {
Show 14 variants
Guild,
Channel,
Thread,
Role,
Emoji,
Sticker,
Member,
User,
Message,
Presence,
VoiceState,
ScheduledEvent,
StageInstance,
SoundboardSound,
}Expand description
A kind of Discord resource the cache can keep.
Each resource has its own Store and its own Limit in the
CacheConfig. A Limit::Max counts in the resource’s scope, the same as the
corresponding discord.js manager: over the whole cache, per guild or per channel (D-159).
discord.js counterpart: the managers passed to makeCache (GuildManager,
GuildMemberManager, MessageManager, …).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Guild
Guilds. Limit counted over the whole cache. Cached by default.
discord.js: GuildManager (client.guilds).
Channel
Guild channels and DM channels, without threads. Limit counted over the whole cache. Cached by default.
discord.js: ChannelManager (client.channels).
Thread
Threads. Limit counted per guild.
discord.js: GuildTextThreadManager, GuildForumThreadManager.
Role
Roles. Limit counted per guild. Cached by default.
discord.js: RoleManager (guild.roles).
Emoji
Custom guild emojis. Limit counted per guild.
discord.js: GuildEmojiManager (guild.emojis).
Sticker
Guild stickers. Limit counted per guild.
discord.js: GuildStickerManager (guild.stickers).
Member
Guild members. Limit counted per guild.
discord.js: GuildMemberManager (guild.members).
User
Users. Limit counted over the whole cache.
discord.js: UserManager (client.users).
Message
Messages. Limit counted per channel.
discord.js: MessageManager (channel.messages).
Presence
Presences (status and activities of members). Limit counted per guild.
discord.js: PresenceManager (guild.presences).
VoiceState
Voice states. Limit counted per guild.
discord.js: VoiceStateManager (guild.voiceStates).
ScheduledEvent
Scheduled events. Limit counted per guild.
discord.js: GuildScheduledEventManager (guild.scheduledEvents).
StageInstance
Stage instances. Limit counted per guild.
discord.js: StageInstanceManager (guild.stageInstances).
SoundboardSound
Guild soundboard sounds. Limit counted per guild.
discord.js: GuildSoundboardSoundManager (guild.soundboardSounds).