Class
ChannelManager
Channel cache + fetch/send helpers. Extends Collection (`.get()`, `.set()`, `.filter()`, …).
Extends Collection
Constructor
new ChannelManager
(client: Client)| Param | Type | Description |
|---|---|---|
| client | Client |
Properties
maxSize
: number (readonly)Methods
fetch
(channelId: string): Promise<Channel>Fetch a channel by ID (returns cache if present).
| Param | Type | Description |
|---|---|---|
| channelId | string |
fetchMessage
(channelId: string, messageId: string): Promise<Message>Fetch a message by channel + message ID (no channel resolve required). Prefer `channel.messages.fetch(messageId)` when you already have a text channel.
| Param | Type | Description |
|---|---|---|
| channelId | string | |
| messageId | string |
resolve
(channelId: string): Promise<Channel>Retrieve from cache, otherwise fetch.
| Param | Type | Description |
|---|---|---|
| channelId | string |
send
(channelId: string, payload: MessagePrepareInput): Promise<Message>Send to a channel by ID without resolving it first.
| Param | Type | Description |
|---|---|---|
| channelId | string | |
| payload | MessagePrepareInput |