TextChannel

export class TextChannel extends BaseGuildTextChannel
export class TextChannel extends BaseGuildTextChannel
Represents a guild text channel on Discord.
defaultAutoArchiveDuration?:ThreadAutoArchiveDuration
The default auto archive duration for newly created threads in this channel
Inherited from BaseGuildTextChannel
defaultThreadRateLimitPerUser:number | null
The initial rate limit per user (slowmode) to set on newly created threads in a channel.
Inherited from BaseGuildTextChannel
nsfw:boolean
If the guild considers this channel NSFW
Inherited from BaseGuildTextChannel
rateLimitPerUser:number
The rate limit per user (slowmode) for this channel in seconds
A manager of the threads belonging to this channel
topic:string | null
The topic of the text channel
Inherited from BaseGuildTextChannel
The type of the channel
createInvite(options?):Promise<Invite>
Creates an invite to this guild channel.
NameTypeOptionalDescription
optionsInviteCreateOptionsYesThe options for creating the invite
Inherited from BaseGuildTextChannel
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
Inherited from BaseGuildTextChannel
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
Inherited from BaseGuildTextChannel
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
Inherited from BaseGuildTextChannel
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