Guild manager
client.guilds is the top-level manager for guild-scoped resources.
It covers:
fetcheditdeletefetchChannels- moderation helpers such as
ban,unban, andkick - emojis and stickers
- bans and invites
- nested role and member managers
Member and role managers are guild-scoped
Instead of using one global manager with aguildId argument everywhere, Chameleon exposes scoped helpers:
Fetch and edit a guild
Moderation operations
Member operations
timeout accepts a Date, Unix millisecond timestamp, or null to clear the timeout.
Search and list members
Role operations
Emojis and stickers
client.guilds also centralizes custom expression management:
listEmojisfetchEmojicreateEmojieditEmojideleteEmojilistStickersfetchSticker
Cache note for members
Member cache keys are composite. Internally, the store uses a guild-and-user key shape, not justuserId.
That means:
- a member is not globally unique by user ID alone
- cross-guild code should always carry the guild ID explicitly
- using
client.guilds.members(guildId)is safer than hand-rolling cache lookups