Managers wrap one family of REST routes. The guild-scoped ones are created on first use, one per guild, and kept in sync by the Gateway. Each takes a reason where Discord records one in the audit log.
Manager
Reached through
RoleManager
client.guilds.roles(guildId)
ThreadManager
client.channels.threads(channelId)
GuildStickerManager
client.guilds.stickers(guildId)
GuildSoundboardManager
client.guilds.soundboard(guildId)
ApplicationEmojiManager
client.applicationEmojis (set once the application is known)
Creates a role. icon is a data URI (or null to remove); unicodeEmoji sets an emoji icon. colors takes { primary, secondary?, tertiary? }: two make a gradient, three the holographic style.
edit(roleId, options)
Edits a role. Same options as create, plus position.
remove(roleId, reason?)
Deletes a role.
setPositions(positions, reason?)
Moves roles in the hierarchy ([{ id, position }]). Returns every role in its new order.
Posts to a forum or media channel: one request creates the thread and its first message. message takes everything send() does, files included, and gets the clientâs default allowedMentions when it has none.
fetchArchived(scope, { before?, limit? })
Lists archived threads, newest first: "public", "private" or "joined-private" (the private ones the bot has joined). Resolves to { threads, members, hasMore }; limit is clamped to 1-100.
toRequest(options, allowedMentions?) turns message options into a REST request: it splits files out into a multipart upload, applies the clientâs default allowedMentions when the message has none, and throws for an allowed_mentions object Discord would reject (a TypeError, or a RangeError past 100 IDs). The managers use it for every message they send.