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>
This commit is contained in:
Jiralite
2022-09-19 22:02:36 +01:00
committed by GitHub
parent 14bbc9150a
commit f6f15d8e87
2 changed files with 5 additions and 3 deletions

View File

@@ -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
* <info>Can only be edited on {@link ChannelType.PrivateThread}</info>
*/
@@ -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<GuildForumThreadChannel>}
* @returns {Promise<ThreadChannel>}
*/
setAppliedTags(appliedTags, reason) {
return this.edit({ appliedTags, reason });

View File

@@ -2608,7 +2608,7 @@ export class ThreadChannel extends TextBasedChannelMixin(BaseChannel, true, [
public setInvitable(invitable?: boolean, reason?: string): Promise<AnyThreadChannel>;
public setLocked(locked?: boolean, reason?: string): Promise<AnyThreadChannel>;
public setName(name: string, reason?: string): Promise<AnyThreadChannel>;
public setAppliedTags(appliedTags: GuildForumTag[], reason?: string): Promise<AnyThreadChannel>;
public setAppliedTags(appliedTags: Snowflake[], reason?: string): Promise<ThreadChannel>;
public toString(): ChannelMention;
}
@@ -5654,6 +5654,7 @@ export interface ThreadEditData {
rateLimitPerUser?: number;
locked?: boolean;
invitable?: boolean;
appliedTags?: Snowflake[];
reason?: string;
}