.acknowledgePins()
→ Promise<void>
Mark all pinned messages as read in this channel.
await channel.acknowledgePins();Class
Base class for all channel types.
Extends Base
new Channel(client: Client, data: APIChannelPartial)Client| Name | Type | Description |
|---|---|---|
| clientread-only | Client | The Client that instantiated this channel. |
| 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. |
| 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.
await channel.acknowledgePins();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 (user account feature).
await channel.bulkDeleteMyMessages();→ boolean
Check if the bot can send messages in this channel.
channel.canSendMessage();→ Promise<void>
Clear the read state for this channel.
await channel.clearReadState();uploads: AttachmentUploadCompleteItem[] → Promise<AttachmentUploadCompleteResponse>
Complete the attachment upload flow after uploading to the CDN.
await channel.completeAttachmentUploads(uploads);_c: Client, _d: APIChannelPartial → DMChannel
Channel.createDM(_c, _d);→ Promise<RtcRegionPayload[]>
Fetch available RTC regions for voice channels.
await channel.fetchRtcRegions();→ Promise<ChannelSlowmodePayload>
Fetch slowmode state for this channel.
await channel.fetchSlowmode();_c: Client, _d: APIChannel | APIChannelPartial → GuildChannel | TextChannel
Wired in structures/Channel.ts after subclasses load.
Channel.from(_c, _d);_c: Client, _d: APIChannel | APIChannelPartial → TextChannel | DMChannel | GuildChannel
Channel.fromOrCreate(_c, _d);→ boolean
Check if this is a DM, group DM, or personal notes channel.
channel.isDM();→ boolean
Check if this is a link channel.
channel.isLink();→ boolean
Check if this is a personal notes channel.
channel.isPersonalNotes();→ boolean
Check if this channel supports sending messages (text/DM).
channel.isTextBased();→ 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();files: UploadFileForSend[] → Promise<RESTPostAPIMessageUploadedAttachment[]>
Upload files for sending in a message (helper).
await channel.uploadAttachmentsForSend(files);