Channel
Base class for all channel types.
Extends Base
Constructor
(client: Client, data: APIChannelPartial)| Param | Type | Description |
|---|---|---|
| client | Client | |
| data | APIChannelPartial |
Properties
: string | nullChannel icon hash (null for most channel types).
: string (readonly)Snowflake ID of this channel.
: string | nullISO8601 timestamp of the last pinned message update.
: string | nullChannel name (null for some channel types).
: ChannelTypeChannel type (text, voice, category, etc.).
Methods
(): Promise<void>Mark all pinned messages as read in this channel.
(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 route
| Param | Type | Description |
|---|---|---|
| countOrIds | number | readonly string[] |
(options?: SudoVerificationOptions): Promise<void>Delete all messages sent by the bot in this channel (user account feature).
| Param | Type | Description |
|---|---|---|
| options? | SudoVerificationOptions |
(): booleanCheck if the bot can send messages in this channel.
(): Promise<void>Clear the read state for this channel.
(uploads: AttachmentUploadCompleteItem[]): Promise<AttachmentUploadCompleteResponse>Complete the attachment upload flow after uploading to the CDN.
| Param | Type | Description |
|---|---|---|
| uploads | AttachmentUploadCompleteItem[] |
(: Client, : APIChannelPartial): DMChannel| Param | Type | Description |
|---|---|---|
| _c | Client | |
| _d | APIChannelPartial |
(): Promise<RtcRegionPayload[]>Fetch available RTC regions for voice channels.
(): Promise<ChannelSlowmodePayload>Fetch slowmode state for this channel.
(: Client, : APIChannel | APIChannelPartial): GuildChannel | TextChannelWired in `structures/Channel.ts` after subclasses load.
| Param | Type | Description |
|---|---|---|
| _c | Client | |
| _d | APIChannel | APIChannelPartial |
(: Client, : APIChannel | APIChannelPartial): TextChannel | DMChannel | GuildChannel| Param | Type | Description |
|---|---|---|
| _c | Client | |
| _d | APIChannel | APIChannelPartial |
(): booleanCheck if this is a DM, group DM, or personal notes channel.
(): booleanCheck if this is a link channel.
(): booleanCheck if this is a personal notes channel.
(): booleanCheck if this channel supports sending messages (text/DM).
(): booleanCheck if this is a voice channel.
(attachments: AttachmentUploadPlanItem[]): Promise<AttachmentUploadPlanResponse>Request upload URLs for attachments before sending a message.
| Param | Type | Description |
|---|---|---|
| attachments | AttachmentUploadPlanItem[] |
(): Promise<void>Trigger the typing indicator in this channel.
(files: UploadFileForSend[]): Promise<RESTPostAPIMessageUploadedAttachment[]>Upload files for sending in a message (helper).
| Param | Type | Description |
|---|---|---|
| files | UploadFileForSend[] |