From f6f15d8e877d4ffbe908a093e64809ef9015e0ff Mon Sep 17 00:00:00 2001
From: Jiralite <33201955+Jiralite@users.noreply.github.com>
Date: Mon, 19 Sep 2022 22:02:36 +0100
Subject: [PATCH] fix: Correct applied tags type (#8641)
* fix: correct applied tags type
* types: this is never a private thread channel
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
---
packages/discord.js/src/structures/ThreadChannel.js | 5 +++--
packages/discord.js/typings/index.d.ts | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js
index 3c646b368925..06b63155e1c2 100644
--- a/packages/discord.js/src/structures/ThreadChannel.js
+++ b/packages/discord.js/src/structures/ThreadChannel.js
@@ -323,6 +323,7 @@ class ThreadChannel extends BaseChannel {
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds
* @property {boolean} [locked] Whether the thread is locked
* @property {boolean} [invitable] Whether non-moderators can add other non-moderators to a thread
+ * @property {Snowflake[]} [appliedTags] The tags to apply to the thread
* @property {string} [reason] Reason for editing the thread
* Can only be edited on {@link ChannelType.PrivateThread}
*/
@@ -445,9 +446,9 @@ class ThreadChannel extends BaseChannel {
/**
* Set the applied tags for this channel (only applicable to forum threads)
- * @param {GuildForumTag[]} appliedTags The tags to set for this channel
+ * @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/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts
index b1ed70520c3c..737d02f9d141 100644
--- a/packages/discord.js/typings/index.d.ts
+++ b/packages/discord.js/typings/index.d.ts
@@ -2608,7 +2608,7 @@ export class ThreadChannel extends TextBasedChannelMixin(BaseChannel, true, [
public setInvitable(invitable?: boolean, reason?: string): Promise;
public setLocked(locked?: boolean, reason?: string): Promise;
public setName(name: string, reason?: string): Promise;
- public setAppliedTags(appliedTags: GuildForumTag[], reason?: string): Promise;
+ public setAppliedTags(appliedTags: Snowflake[], reason?: string): Promise;
public toString(): ChannelMention;
}
@@ -5654,6 +5654,7 @@ export interface ThreadEditData {
rateLimitPerUser?: number;
locked?: boolean;
invitable?: boolean;
+ appliedTags?: Snowflake[];
reason?: string;
}