Skip to content

DirectoryChannel ​

classe · Source

Represents a channel that displays a directory of guilds.

Extends: Channel

Properties ​

name ​

name: string

The channel's name Source

type ​

type: ChannelType

The type of the channel Source

id ​

id: Snowflake

The channel's id Source

flags ​

nullable

flags: Readonly<ChannelFlags>

The flags that are applied to the channel. Source

createdTimestamp ​

readonly

createdTimestamp: number

The timestamp the channel was created at Source

createdAt ​

readonly

createdAt: Date

The time the channel was created at Source

deleted ​

deprecated

deleted: boolean

Whether or not the structure has been deleted Source

partial ​

readonly

partial: boolean

Whether this Channel is a partial This is always false outside of DM channels. Source

client ​

readonly

client: Client

The client that instantiated this Source

Methods ​

toString ​

toString(): string

When concatenated with a string, this automatically returns the channel's mention instead of the Channel object. Returns: string

js
// Logs: Hello from <#123456789012345678>!
console.log(`Hello from ${channel}!`);

Source

delete ​

async

async delete(): Promise<Channel>

Deletes this channel. Returns: Promise<Channel>

js
// Delete the channel
channel.delete()
  .then(console.log)
  .catch(console.error);

Source

fetch ​

fetch(force?: boolean): Promise<Channel>

Fetches this channel. Parameters

NameTypeDescription
force?booleanWhether to skip the cache check and request the API Default: true.

Returns: Promise<Channel>Source

isText ​

isText(): boolean

Indicates whether this channel is text-based. Returns: booleanSource

isVoice ​

isVoice(): boolean

Indicates whether this channel is voice-based. Returns: booleanSource

isThread ​

isThread(): boolean

Indicates whether this channel is a ThreadChannel. Returns: booleanSource

isThreadOnly ​

isThreadOnly(): boolean

Indicates whether this channel is ThreadOnlyChannel. Returns: booleanSource

isDirectory ​

isDirectory(): boolean

Indicates whether this channel is a DirectoryChannelReturns: booleanSource

Unofficial software. Not affiliated with or supported by Discord.