.acknowledgePins()
→ Promise<void>
Mark all pinned messages as read in this channel. Session-token helper; bots usually skip this.
await channel.acknowledgePins();Class
Base class for all channel types. client.channels.fetch and message.resolveChannel return this type; call delete on it. Text-capable channels (isTextBased) also have send. Narrow with isTextBased / isGuild.
Extends Base
new Channel(client: Client, data: APIChannelPartial)Client| Name | Type | Description |
|---|---|---|
| clientread-only | Client | The Client that instantiated this channel. |
| createdAtread-only | Date | Date when this channel was created, derived from its snowflake ID. |
| createdTimestampread-only | number | Unix timestamp (ms) when this channel was created, derived from its snowflake ID. |
| icon | string | null | Channel icon hash (null for most channel types). |
| idread-only | string | Snowflake ID of this channel. |
| lastPinTimestamp | string | null | ISO8601 timestamp of the last pinned message update. |
| messagesread-only | MessageManager | Per-channel message cache + fetch. |
| name | string | null | Channel name (null for some channel types). |
| type | ChannelType | Channel type (text, voice, category, etc.). |
→ Promise<void>
Mark all pinned messages as read in this channel. Session-token helper; bots usually skip this.
await channel.acknowledgePins();options?: MessageCollectorOptions & { errors?: MessageCollectorEndReason[] } → Promise<Collection<string, Message>>
Wait for messages matching the filter, then resolve the collected set. Pass errors: ['time'] to reject when the timer fires instead of resolving.
const collected = await channel.awaitMessages({ max: 1, time: 15_000 });countOrIds: number | readonly string[] → Promise<string[]>
Delete recent messages or an explicit ID list.
bulkDelete(5) — fetch last 5 via MessageManager then delete (1–100)bulkDelete(['id1']) — single DELETE; 2–100 uses bulk-delete routeawait channel.bulkDelete(countOrIds);options?: SudoVerificationOptions → Promise<void>
Delete all messages sent by the bot in this channel. Sudo auto-passes for bots.
await channel.bulkDeleteMyMessages();→ boolean
Whether this channel type can carry messages (does not check permissions).
channel.canSendMessage();→ Promise<void>
Clear the read state for this channel. Session-token helper; bots usually skip this.
await channel.clearReadState();uploads: AttachmentUploadCompleteItem[] → Promise<AttachmentUploadCompleteResponse>
Complete the attachment upload flow after uploading to the CDN.
await channel.completeAttachmentUploads(uploads);options?: MessageCollectorOptions → MessageCollector
Collect messages in this channel until time/max/stop.
channel.createMessageCollector();options?: SudoVerificationOptions & { silent?: boolean; deleteMessages?: boolean; reason?: string; } → Promise<void>
Delete this channel (or close it if it is a DM). Guild channels require Manage Channels. silent / deleteMessages are Fluxer query params.
const channel = await client.channels.fetch(channelId);
await channel.delete();→ Promise<RtcRegionPayload[]>
Fetch available RTC regions for voice channels. User-account only (DefaultUserOnly); bots receive AccessDeniedError. Bots should skip this and join voice with @fluxerjs/voice instead.
await channel.fetchRtcRegions();→ Promise<ChannelSlowmodePayload>
Fetch slowmode state for this channel.
await channel.fetchSlowmode();→ boolean
Check if this is a guild announcement channel.
channel.isAnnouncement();→ boolean
Check if this is a category channel.
channel.isCategory();→ boolean
Check if this is a DM, group DM, or personal notes channel.
channel.isDM();→ boolean
Check if this is a forum channel.
channel.isForum();→ boolean
Check if this is a guild channel, including threads, forums, and media channels.
channel.isGuild();→ boolean
Check if this is a link channel.
channel.isLink();→ boolean
Check if this is a media channel.
channel.isMedia();→ boolean
Check if this is a personal notes channel.
channel.isPersonalNotes();→ boolean
Check if this is a guild text channel.
channel.isText();→ boolean
Whether this channel type can carry messages (text, announcement, voice, threads, DM, group DM, notes). Forum and media channels contain threads and do not accept send. Checks ChannelType, not whether send exists on the instance.
channel.isTextBased();→ boolean
Check if this is a thread (public, private, or announcement).
channel.isThread();→ boolean
Check if this is a voice channel.
channel.isVoice();attachments: AttachmentUploadPlanItem[] → Promise<AttachmentUploadPlanResponse>
Request upload URLs for attachments before sending a message.
await channel.requestAttachmentUploads(attachments);→ Promise<void>
Trigger the typing indicator in this channel.
await channel.sendTyping();→ string
Channel mention (<#id>).
channel.toString();files: UploadFileForSend[] → Promise<RESTPostAPIMessageUploadedAttachment[]>
Upload files for sending in a message (helper).
await channel.uploadAttachmentsForSend(files);