fix(ThreadChannel): Allow editing flags (#8671)

fix(ThreadChannel): allow editing flags

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jiralite
2022-09-24 15:02:30 +01:00
committed by GitHub
parent b1e190c4f0
commit 1244854e13
2 changed files with 4 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ const TextBasedChannel = require('./interfaces/TextBasedChannel');
const { RangeError, ErrorCodes } = require('../errors');
const MessageManager = require('../managers/MessageManager');
const ThreadMemberManager = require('../managers/ThreadMemberManager');
const ChannelFlagsBitField = require('../util/ChannelFlagsBitField');
/**
* Represents a thread channel on Discord.
@@ -324,6 +325,7 @@ class ThreadChannel extends BaseChannel {
* @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 {ChannelFlagsResolvable} [flags] The flags to set on the channel
* @property {string} [reason] Reason for editing the thread
* <info>Can only be edited on {@link ChannelType.PrivateThread}</info>
*/
@@ -348,6 +350,7 @@ class ThreadChannel extends BaseChannel {
locked: data.locked,
invitable: this.type === ChannelType.PrivateThread ? data.invitable : undefined,
applied_tags: data.appliedTags,
flags: 'flags' in data ? ChannelFlagsBitField.resolve(data.flags) : undefined,
},
reason: data.reason,
});

View File

@@ -5658,6 +5658,7 @@ export interface ThreadEditData {
locked?: boolean;
invitable?: boolean;
appliedTags?: Snowflake[];
flags?: ChannelFlagsResolvable;
reason?: string;
}