Message manager
client.messages is the workhorse manager for most bots.
It covers:
fetch
send
edit
delete
list
- reactions and pins
- file uploads
- component payloads
- poll payloads
Send a message
If you only need plain text, a string works too:
Reply to a message
That is the Chameleon equivalent of a reply helper on the message instance.
Edit and delete
edit and delete both update the local message cache when the operation succeeds.
Send files
Use AttachmentBuilder when you need to upload from disk or from an in-memory buffer.
Send Components V2 layouts
flags: MESSAGE_FLAGS.IS_COMPONENTS_V2 is what tells Discord to interpret the message as a V2 layout payload.
Channel manager
client.channels owns channel-level operations:
fetch
create
edit
delete
clone
setPositions
- permission overwrites
- invites
- announcement following
- thread creation and membership
Create or edit a channel
When a manager accepts reason, Chameleon forwards it as the audit log reason header.
Clone a cached channel
clone depends on the source channel already being in cache. If it is not cached, fetch it first.
Create threads
The same manager also exposes joinThread, leaveThread, listActiveThreads, and listArchivedThreads.
Typing, invites, and followers
This is useful for operational bots that automate guild configuration or notification fanout.
Recommended pattern
For runtime code, keep a simple split:
- use
client.messages for message lifecycle
- use
client.channels for structure and thread operations
- use components and modal builders for interaction payloads
- check
result.ok at the edge of each async operation
That keeps the rest of your bot code plain and unsurprising.Last modified on June 13, 2026