.applyEditPatch(data)
data: APIChannel → void
channel.applyEditPatch(data);Class
A text channel in a guild (supports sending messages).
Extends TextCapable(GuildChannel)
new TextChannel(client: Client, data: APIChannel)ClientAPIChannel| Name | Type | Description |
|---|---|---|
| contentWarningLevel? | number | null | Content warning level. |
| contentWarningText? | string | null | Custom content warning text. |
| defaultAutoArchiveDuration | number | null | Default auto-archive duration in minutes for new threads. |
| defaultThreadRateLimitPerUser | number | null | Slowmode in seconds copied onto new threads. |
| lastMessageId? | string | null | ID of the last message sent in this channel. |
| nsfw? | boolean | Whether this channel is marked as NSFW. |
| nsfwOverride? | boolean | null | Per-channel NSFW override (null inherits). |
| rateLimitPerUser? | number | Slowmode rate limit in seconds. |
| threadsread-only | ThreadManager | Create, list, and search threads in this channel. |
| topic? | string | null | Channel topic. |
data: APIChannel → void
channel.applyEditPatch(data);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);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);