ForumChannel
Defined in: packages/structures/src/channels.ts:92
A guild forum channel.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ForumChannel(
data,context?):ForumChannel
Defined in: packages/structures/src/channels.ts:102
Parameters
Section titled “Parameters”context?
Section titled “context?”Returns
Section titled “Returns”ForumChannel
Overrides
Section titled “Overrides”Properties
Section titled “Properties”availableTags
Section titled “availableTags”availableTags:
APIForumTag[]
Defined in: packages/structures/src/channels.ts:94
Tags that threads can apply.
defaultAutoArchiveDuration
Section titled “defaultAutoArchiveDuration”defaultAutoArchiveDuration:
number|null
Defined in: packages/structures/src/channels.ts:100
Default auto-archive duration for new threads.
defaultReactionEmoji
Section titled “defaultReactionEmoji”defaultReactionEmoji:
APIPartialEmoji|null
Defined in: packages/structures/src/channels.ts:96
Default reaction for new threads.
defaultThreadRateLimitPerUser
Section titled “defaultThreadRateLimitPerUser”defaultThreadRateLimitPerUser:
number
Defined in: packages/structures/src/channels.ts:98
Default slowmode for new threads.
guildId?
Section titled “guildId?”
optionalguildId?:string
Defined in: packages/structures/src/base.ts:236
Inherited from
Section titled “Inherited from”
readonlyid:string
Defined in: packages/structures/src/base.ts:12
Inherited from
Section titled “Inherited from”
optionalname?:string|null
Defined in: packages/structures/src/base.ts:235
Inherited from
Section titled “Inherited from”
optionalnsfw?:boolean
Defined in: packages/structures/src/base.ts:239
Inherited from
Section titled “Inherited from”parentId?
Section titled “parentId?”
optionalparentId?:string|null
Defined in: packages/structures/src/base.ts:238
Inherited from
Section titled “Inherited from”partial
Section titled “partial”partial:
boolean
Defined in: packages/structures/src/base.ts:249
A placeholder built from a message’s channel_id, not from channel
data: its type, name, parentId and permissionOverwrites are not
the real channel’s, so nothing may decide access from them.
Inherited from
Section titled “Inherited from”permissionOverwrites
Section titled “permissionOverwrites”permissionOverwrites:
APIOverwrite[]
Defined in: packages/structures/src/base.ts:243
Role and member permission overwrites (empty for DMs and when not provided).
Inherited from
Section titled “Inherited from”position?
Section titled “position?”
optionalposition?:number
Defined in: packages/structures/src/base.ts:241
Inherited from
Section titled “Inherited from”rateLimitPerUser?
Section titled “rateLimitPerUser?”
optionalrateLimitPerUser?:number
Defined in: packages/structures/src/base.ts:240
Inherited from
Section titled “Inherited from”topic?
Section titled “topic?”
optionaltopic?:string|null
Defined in: packages/structures/src/base.ts:237
Inherited from
Section titled “Inherited from”type:
number
Defined in: packages/structures/src/base.ts:234
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”createdAt
Section titled “createdAt”Get Signature
Section titled “Get Signature”get createdAt():
Date
Defined in: packages/structures/src/base.ts:29
Returns the timestamp this snowflake was created at.
Returns
Section titled “Returns”Date
Inherited from
Section titled “Inherited from”createdTimestamp
Section titled “createdTimestamp”Get Signature
Section titled “Get Signature”get createdTimestamp():
number
Defined in: packages/structures/src/base.ts:25
Milliseconds since the Unix epoch at which this snowflake was created.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get kind():
"text"|"dm"|"voice"|"group-dm"|"category"|"announcement"|"thread"|"stage"|"directory"|"forum"|"media"|"unknown"
Defined in: packages/structures/src/base.ts:345
What kind of channel this is: "text", "voice", "thread", "forum"… ("unknown" for a type this version does not know).
Returns
Section titled “Returns”"text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”as<
K>(…kinds):ChannelOfKind<K>
Defined in: packages/structures/src/base.ts:363
Returns this channel typed as one of kinds.
Type Parameters
Section titled “Type Parameters”K extends "text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"
Parameters
Section titled “Parameters”…K[]
Returns
Section titled “Returns”Throws
Section titled “Throws”If it is a different kind.
Inherited from
Section titled “Inherited from”delete()
Section titled “delete()”delete(
reason?):Promise<void>
Defined in: packages/structures/src/base.ts:333
Deletes this channel.
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Audit-log reason.
Returns
Section titled “Returns”Promise<void>
A promise fulfilled when Discord confirms deletion.
Throws
Section titled “Throws”If the channel is not attached to a client.
Inherited from
Section titled “Inherited from”edit()
Section titled “edit()”edit(
options):Promise<Channel>
Defined in: packages/structures/src/base.ts:288
Edits this channel.
Parameters
Section titled “Parameters”options
Section titled “options”Record<string, unknown>
Channel fields to change.
Returns
Section titled “Returns”Promise<Channel>
The updated channel.
Throws
Section titled “Throws”If the channel is not attached to a client.
Inherited from
Section titled “Inherited from”editName()
Section titled “editName()”editName(
name):Promise<Channel>
Defined in: packages/structures/src/base.ts:295
Changes only this channel’s name.
Parameters
Section titled “Parameters”string
New channel name.
Returns
Section titled “Returns”Promise<Channel>
The updated channel.
Throws
Section titled “Throws”If the name is empty.
Throws
Section titled “Throws”If the channel is not attached to a client.
Inherited from
Section titled “Inherited from”editParent()
Section titled “editParent()”editParent(
parentId):Promise<Channel>
Defined in: packages/structures/src/base.ts:328
Parameters
Section titled “Parameters”parentId
Section titled “parentId”string | null
Returns
Section titled “Returns”Promise<Channel>
Inherited from
Section titled “Inherited from”editPermissionOverwrite()
Section titled “editPermissionOverwrite()”editPermissionOverwrite(
targetId,changes,options?):Promise<void>
Defined in: packages/structures/src/base.ts:313
Changes some permissions of one overwrite and keeps the rest: true
allows, false denies, null resets to inherited.
Parameters
Section titled “Parameters”targetId
Section titled “targetId”string
Role or member ID.
changes
Section titled “changes”PermissionOverwriteChanges
Permissions to change.
options?
Section titled “options?”type (0 role, 1 member) when the overwrite does not exist yet; audit-log reason.
reason?
Section titled “reason?”string
0 | 1
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”channel.editPermissionOverwrite(userId, { ViewChannel: true, SendMessages: false }, { type: 1 })Inherited from
Section titled “Inherited from”Channel.editPermissionOverwrite
editTopic()
Section titled “editTopic()”editTopic(
topic):Promise<Channel>
Defined in: packages/structures/src/base.ts:301
Changes only this channel’s topic.
Parameters
Section titled “Parameters”string | null
New topic, or null to clear it.
Returns
Section titled “Returns”Promise<Channel>
The updated channel.
Throws
Section titled “Throws”If the channel is not attached to a client.
Inherited from
Section titled “Inherited from”is<
K>(…kinds):this is ChannelOfKind<K>
Defined in: packages/structures/src/base.ts:353
Whether this channel is one of kinds, narrowing its type to match.
Type Parameters
Section titled “Type Parameters”K extends "text" | "dm" | "voice" | "group-dm" | "category" | "announcement" | "thread" | "stage" | "directory" | "forum" | "media" | "unknown"
Parameters
Section titled “Parameters”…K[]
Returns
Section titled “Returns”this is ChannelOfKind<K>
Example
Section titled “Example”if (channel.is("text", "announcement")) await channel.send({ content: "hi" });Inherited from
Section titled “Inherited from”isDMBased()
Section titled “isDMBased()”isDMBased():
boolean
Defined in: packages/structures/src/base.ts:389
Whether this is a direct-message channel (DM or group DM).
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isTextBased()
Section titled “isTextBased()”isTextBased():
boolean
Defined in: packages/structures/src/base.ts:379
Whether messages can be sent in this channel (text, DM, announcement, voice, stage, threads).
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isThread()
Section titled “isThread()”isThread():
boolean
Defined in: packages/structures/src/base.ts:374
Whether this is a thread (announcement, public or private).
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isVoiceBased()
Section titled “isVoiceBased()”isVoiceBased():
boolean
Defined in: packages/structures/src/base.ts:384
Whether this is a voice or stage channel.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”send()
Section titled “send()”send(
options):Promise<Message>
Defined in: packages/structures/src/base.ts:279
Sends a message to this channel.
Parameters
Section titled “Parameters”options
Section titled “options”Message payload.
Returns
Section titled “Returns”Promise<Message>
The created message.
Throws
Section titled “Throws”If the channel is not attached to a client.
Inherited from
Section titled “Inherited from”toString()
Section titled “toString()”toString():
string
Defined in: packages/structures/src/base.ts:394
Returns the Discord channel mention string. Used automatically in template literals.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”update()
Section titled “update()”update(
options):Promise<Channel>
Defined in: packages/structures/src/base.ts:340
Updates this channel using the same resource operation as edit.
Parameters
Section titled “Parameters”options
Section titled “options”Record<string, unknown>
Channel fields to change.
Returns
Section titled “Returns”Promise<Channel>
The updated channel.
Throws
Section titled “Throws”If the channel is not attached to a client.