BaseGuildTextChannel

export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, true)
export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, true)
Represents a text-based guild channel on Discord.

Extends

TextBasedChannelMixin(GuildChannel, true)
constructor(guild, data?, client?, immediatePatch?)
Constructs a new instance of the BaseGuildTextChannel class
NameTypeOptionalDescription
guildGuildNoNone
dataRawGuildChannelDataYesNone
clientClient<true>YesNone
immediatePatchbooleanYesNone
defaultAutoArchiveDuration?:ThreadAutoArchiveDuration
The default auto archive duration for newly created threads in this channel
defaultThreadRateLimitPerUser:number | null
The initial rate limit per user (slowmode) to set on newly created threads in a channel.
nsfw:boolean
If the guild considers this channel NSFW
rateLimitPerUser:number | null
A manager of the threads belonging to this channel
topic:string | null
The topic of the text channel
createInvite(options?):Promise<Invite>
Creates an invite to this guild channel.
NameTypeOptionalDescription
optionsInviteCreateOptionsYesThe options for creating the invite
fetchInvites(cache?):Promise<Collection<string, Invite>>
Fetches a collection of invites to this guild channel. Resolves with a collection mapping invites by their codes.
NameTypeOptionalDescription
cachebooleanYesWhether or not to cache the fetched invites
setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason?):Promise<this>
Sets the default auto archive duration for all newly created threads in this channel.
NameTypeOptionalDescription
defaultAutoArchiveDurationThreadAutoArchiveDurationNoThe new default auto archive duration
reasonstringYesReason for changing the channel's default auto archive duration
setTopic(topic, reason?):Promise<this>
Sets a new topic for the guild channel.
NameTypeOptionalDescription
topicstring | nullNoThe new topic for the guild channel
reasonstringYesReason for changing the guild channel's topic
setType(type, reason?):Promise<TextChannel>
Sets the type of this channel. Only conversion between TextChannel and NewsChannel is supported.
NameTypeOptionalDescription
typeChannelType.GuildTextNoThe new channel type
reasonstringYesReason for changing the channel's type