export abstract class BaseChannel extends BaseRepresents any channel on Discord.
appPermissions : Readonly<PermissionsBitField> | null
The computed permissions of the application in this channel, including overwrites. This is only present on channels received through an interaction's resolved data, and only when the application's bot user is in the guild.
flags : Readonly<ChannelFlagsBitField> | null
The flags that are applied to the channel. This is only null in a PartialGroupDMChannel. In all other cases, it is not null.
id : Snowflake
The channel's id
Whether this Channel is a partial This is always false outside of DM channels.
permissions : Readonly<PermissionsBitField> | null
The computed permissions of the user who invoked the interaction in this channel, including overwrites. This is only present on channels received through an interaction's resolved data.
type : ChannelType
The type of the channel
readonlyurl : string
The URL to the channel
delete() : Promise<this>
Deletes this channel.
// Delete the channel
channel.delete()
.then(console.log)
.catch(console.error);isDMBased() : this is DMChannel | PartialDMChannel | PartialGroupDMChannel
Indicates whether this channel is DM-based (either a DMChannel or a PartialGroupDMChannel).
isSendable() : this is SendableChannels
Indicates whether this channel is sendable.
isTextBased() : this is TextBasedChannel
Indicates whether this channel is text-based.
isThread() : this is AnyThreadChannel
Indicates whether this channel is a ThreadChannel.
isThreadOnly() : this is ThreadOnlyChannel
Indicates whether this channel is thread-only.
isVoiceBased() : this is VoiceBasedChannel
Indicates whether this channel is voice-based.
toString() : ChannelMention | UserMention
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
// Logs: Hello from <#123456789012345678>!
console.log(`Hello from ${channel}!`);