Channel

class Channel()

Shared channel data available before narrowing to a concrete channel class. Prefer the discord.is*Channel() guards or a ChannelType comparison before calling methods that only exist on text, voice, forum, or thread channels.

exported from lib.weeble.d

Implements:

Properties

Channel.createdAt

type: readonly Date | null

When this channel was created, decoded from the channel snowflake.

Channel.id

type: readonly string

Channel ID.

Channel.type

type: readonly ChannelType

The type of this channel — use this to narrow to the correct subclass.

Methods

async Channel.delete(reason: string) Promise<void>

Delete this channel.

async Channel.fetch() Promise<AnyChannel>

Requests the latest channel data from Discord instead of relying on cached state.

Channel.toMention() string

Returns <#channelId> mention syntax.