Skip to main content

Guild manager

client.guilds is the top-level manager for guild-scoped resources. It covers:
  • fetch
  • edit
  • delete
  • fetchChannels
  • moderation helpers such as ban, unban, and kick
  • 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 a guildId argument everywhere, Chameleon exposes scoped helpers:
That usually reads better in real bot code and reduces repeated parameter noise.

Fetch and edit a guild

As with other managers, successful writes update the cache when the manager owns that cache entry.

Moderation operations

These methods return explicit result objects, so moderation flows can branch without exceptions.

Member operations

timeout accepts a Date, Unix millisecond timestamp, or null to clear the timeout.

Search and list members

This is often a better fit than assuming the full member list is already hot in cache.

Role operations

Use the nested role manager whenever the operation is inherently guild-scoped.

Emojis and stickers

client.guilds also centralizes custom expression management:
  • listEmojis
  • fetchEmoji
  • createEmoji
  • editEmoji
  • deleteEmoji
  • listStickers
  • fetchSticker
That makes the guild manager the right entry point for most customization tooling.

Cache note for members

Member cache keys are composite. Internally, the store uses a guild-and-user key shape, not just userId. 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
That design avoids collisions and matches Discord’s actual data model better than pretending members are standalone global entities.
Last modified on June 13, 2026