Skip to content

Commit

Permalink
fix: minor forums cleanup (#9033)
Browse files Browse the repository at this point in the history
* docs(GuildChannelResolvable): remove extra `ForumChannel`

* docs: replace `GuildForumThreadChannel`

* docs: `Channel` correct reference

* refactor: move `threadName` to the right method
  • Loading branch information
Jiralite committed Feb 17, 2023
1 parent 86329ad commit eed293f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/managers/GuildChannelManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/structures/ThreadChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,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);
Expand Down
2 changes: 1 addition & 1 deletion src/structures/Webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class Webhook {
* @property {string} [avatarURL] Avatar URL override for the message
* @property {Snowflake} [threadId] The id of the thread in the channel to send 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)
* @property {MessageFlags} [flags] Which flags to set for the message. Only `SUPPRESS_EMBEDS` can be set.
*/

Expand All @@ -131,7 +132,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)
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/util/ChannelFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6353,7 +6353,6 @@ export interface ThreadEditData {
rateLimitPerUser?: number;
locked?: boolean;
invitable?: boolean;
threadName?: string;
appliedTags?: Snowflake[];
flags?: ChannelFlagsResolvable;
}
Expand Down Expand Up @@ -6434,6 +6433,7 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
username?: string;
avatarURL?: string;
threadId?: Snowflake;
threadName?: string;
}

export type WebhookType = keyof typeof WebhookTypes;
Expand Down

0 comments on commit eed293f

Please sign in to comment.