export abstract class BaseChannel extends Base
Represents any channel on Discord.
Readonly<ChannelFlagsBitField> | null flags :
The flags that are applied to the channel. This is only null
in a PartialGroupDMChannel. In all other cases, it is not null
.
Snowflake id :
The channel's id
Whether this Channel is a partial This is always false outside of DM channels.
ChannelType type :
The type of the channel
readonlystring url :
The URL to the channel
deletePromise<this> () :
Deletes this channel.
Examples:
// Delete the channel
channel.delete()
.then(console.log)
.catch(console.error);
isDMBasedthis is PartialGroupDMChannel | DMChannel | PartialDMChannel () :
Indicates whether this channel is DM-based (either a DMChannel or a PartialGroupDMChannel).
isTextBasedthis is TextBasedChannel () :
Indicates whether this channel is .
isThreadthis is AnyThreadChannel () :
Indicates whether this channel is a ThreadChannel.
isThreadOnlythis is ThreadOnlyChannel () :
Indicates whether this channel is thread-only.
isVoiceBasedthis is VoiceBasedChannel () :
Indicates whether this channel is voice-based.
toStringChannelMention | UserMention () :
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
Examples:
// Logs: Hello from <#123456789012345678>!
console.log(`Hello from ${channel}!`);