Class

TextChannel

A text channel in a guild (supports sending messages).

Extends TextCapable(GuildChannel)

Constructor

new TextChannel(client: Client, data: APIChannel)
client
Client

Properties

NameTypeDescription
contentWarningLevel?number | nullContent warning level.
contentWarningText?string | nullCustom content warning text.
defaultAutoArchiveDurationnumber | nullDefault auto-archive duration in minutes for new threads.
defaultThreadRateLimitPerUsernumber | nullSlowmode in seconds copied onto new threads.
lastMessageId?string | nullID of the last message sent in this channel.
nsfw?booleanWhether this channel is marked as NSFW.
nsfwOverride?boolean | nullPer-channel NSFW override (null inherits).
rateLimitPerUser?numberSlowmode rate limit in seconds.
threadsread-onlyThreadManagerCreate, list, and search threads in this channel.
topic?string | nullChannel topic.

Methods

.editThreadDefaults(options)

options: ThreadParentEditOptions → Promise<this>

Set the auto-archive and slowmode defaults copied onto new threads. Sends only those fields. The thread-parent update body does not accept a channel rename.

await channel.editThreadDefaults(options);

.setSlowmode(seconds)

seconds: number → Promise<this>

Set slowmode (seconds between messages). Pass 0 to disable. Requires Manage Channels. Calls channel.edit with rateLimitPerUser.

await channel.setSlowmode(seconds);