fix: Minor forums cleanup

#9033 djs
This commit is contained in:
Elysia 2023-02-05 15:05:37 +07:00
parent cee3b55f59
commit f70663aba1
5 changed files with 6 additions and 7 deletions

View File

@ -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
*/
/**

View File

@ -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<GuildForumThreadChannel>}
* @returns {Promise<ThreadChannel>}
*/
setAppliedTags(appliedTags, reason) {
return this.edit({ appliedTags }, reason);

View File

@ -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.
* <info>For interaction webhooks, this property is ignored</info>
* @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
* <info>For interaction webhooks, this property is ignored</info>
* @property {string} [threadName] Name of the thread to create (only available if webhook is in a forum channel)
*/
/**

View File

@ -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 {}

2
typings/index.d.ts vendored
View File

@ -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<MessageOptions, 'reply' | 's
username?: string;
avatarURL?: string;
threadId?: Snowflake;
threadName?: string;
}
export type WebhookType = keyof typeof WebhookTypes;