From f70663aba1398866401159cadc8cb77b7021b712 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 5 Feb 2023 15:05:37 +0700 Subject: [PATCH] fix: Minor forums cleanup #9033 djs --- src/managers/GuildChannelManager.js | 3 +-- src/structures/ThreadChannel.js | 2 +- src/structures/Webhook.js | 4 ++-- src/util/ChannelFlags.js | 2 +- typings/index.d.ts | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/managers/GuildChannelManager.js b/src/managers/GuildChannelManager.js index 0b4ad0d..1dc748a 100644 --- a/src/managers/GuildChannelManager.js +++ b/src/managers/GuildChannelManager.js @@ -80,9 +80,8 @@ class GuildChannelManager extends CachedManager { * Data that can be resolved to give a Guild Channel object. This can be: * * A GuildChannel object * * A ThreadChannel object - * * A ForumChannel object * * A Snowflake - * @typedef {GuildChannel|ThreadChannel|ForumChannel|Snowflake} GuildChannelResolvable + * @typedef {GuildChannel|ThreadChannel|Snowflake} GuildChannelResolvable */ /** diff --git a/src/structures/ThreadChannel.js b/src/structures/ThreadChannel.js index 3245119..cc53c5e 100644 --- a/src/structures/ThreadChannel.js +++ b/src/structures/ThreadChannel.js @@ -484,7 +484,7 @@ class ThreadChannel extends Channel { * Set the applied tags for this channel (only applicable to forum threads) * @param {Snowflake[]} appliedTags The tags to set for this channel * @param {string} [reason] Reason for changing the thread's applied tags - * @returns {Promise} + * @returns {Promise} */ setAppliedTags(appliedTags, reason) { return this.edit({ appliedTags }, reason); diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 013f38f..95e3cdb 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -125,8 +125,9 @@ class Webhook { * @property {string} [username=this.name] Username override for the message * @property {string} [avatarURL] Avatar URL override for the message * @property {Snowflake} [threadId] The id of the thread in the channel to send to. - * @property {MessageFlags} [flags] Which flags to set for the message. Only `SUPPRESS_EMBEDS` can be set. * For interaction webhooks, this property is ignored + * @property {string} [threadName] Name of the thread to create (only available if webhook is in a forum channel) + * @property {MessageFlags} [flags] Which flags to set for the message. Only `SUPPRESS_EMBEDS` can be set. */ /** @@ -141,7 +142,6 @@ class Webhook { * Action rows containing interactive components for the message (buttons, select menus) * @property {Snowflake} [threadId] The id of the thread this message belongs to * For interaction webhooks, this property is ignored - * @property {string} [threadName] Name of the thread to create (only available if webhook is in a forum channel) */ /** diff --git a/src/util/ChannelFlags.js b/src/util/ChannelFlags.js index 302baa9..2e5d809 100644 --- a/src/util/ChannelFlags.js +++ b/src/util/ChannelFlags.js @@ -3,7 +3,7 @@ const BitField = require('./BitField'); /** - * Data structure that makes it easy to interact with a {@link BaseChannel#flags} bitfield. + * Data structure that makes it easy to interact with a {@link Channel#flags} bitfield. * @extends {BitField} */ class ChannelFlags extends BitField {} diff --git a/typings/index.d.ts b/typings/index.d.ts index 88a0888..ef7f20e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -7147,7 +7147,6 @@ export interface ThreadEditData { rateLimitPerUser?: number; locked?: boolean; invitable?: boolean; - threadName?: string; appliedTags?: Snowflake[]; flags?: ChannelFlagsResolvable; } @@ -7231,6 +7230,7 @@ export interface WebhookMessageOptions extends Omit