From 0b8b114761f961a2bf8e5aae342ed711b154a89e Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sat, 24 Dec 2022 07:35:32 +0000 Subject: [PATCH] docs: Fix malformed overridden documentation (#8954) * docs: override `resolve()` & `resolveId()` * docs(CategoryChannel): move `setParent()` up Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../src/managers/AutoModerationRuleManager.js | 36 +++++++++---------- .../src/structures/CategoryChannel.js | 18 +++++----- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/discord.js/src/managers/AutoModerationRuleManager.js b/packages/discord.js/src/managers/AutoModerationRuleManager.js index 308610988..b212babb0 100644 --- a/packages/discord.js/src/managers/AutoModerationRuleManager.js +++ b/packages/discord.js/src/managers/AutoModerationRuleManager.js @@ -26,6 +26,24 @@ class AutoModerationRuleManager extends CachedManager { * @name AutoModerationRuleManager#cache */ + /** + * Resolves an {@link AutoModerationRuleResolvable} to an {@link AutoModerationRule} object. + * @method resolve + * @memberof AutoModerationRuleManager + * @instance + * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve + * @returns {?AutoModerationRule} + */ + + /** + * Resolves an {@link AutoModerationRuleResolvable} to a {@link AutoModerationRule} id. + * @method resolveId + * @memberof AutoModerationRuleManager + * @instance + * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve + * @returns {?Snowflake} + */ + _add(data, cache) { return super._add(data, cache, { extras: [this.guild] }); } @@ -259,24 +277,6 @@ class AutoModerationRuleManager extends CachedManager { const autoModerationRuleId = this.resolveId(autoModerationRule); await this.client.rest.delete(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), { reason }); } - - /** - * Resolves an {@link AutoModerationRuleResolvable} to an {@link AutoModerationRule} object. - * @method resolve - * @memberof AutoModerationRuleManager - * @instance - * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve - * @returns {?AutoModerationRule} - */ - - /** - * Resolves an {@link AutoModerationRuleResolvable} to a {@link AutoModerationRule} id. - * @method resolveId - * @memberof AutoModerationRuleManager - * @instance - * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve - * @returns {?Snowflake} - */ } module.exports = AutoModerationRuleManager; diff --git a/packages/discord.js/src/structures/CategoryChannel.js b/packages/discord.js/src/structures/CategoryChannel.js index 6f53858ce..df3621f4e 100644 --- a/packages/discord.js/src/structures/CategoryChannel.js +++ b/packages/discord.js/src/structures/CategoryChannel.js @@ -8,15 +8,6 @@ const CategoryChannelChildManager = require('../managers/CategoryChannelChildMan * @extends {GuildChannel} */ class CategoryChannel extends GuildChannel { - /** - * A manager of the channels belonging to this category - * @type {CategoryChannelChildManager} - * @readonly - */ - get children() { - return new CategoryChannelChildManager(this); - } - /** * Sets the category parent of this channel. * It is not currently possible to set the parent of a CategoryChannel. @@ -27,6 +18,15 @@ class CategoryChannel extends GuildChannel { * @param {SetParentOptions} [options={}] The options for setting the parent * @returns {Promise} */ + + /** + * A manager of the channels belonging to this category + * @type {CategoryChannelChildManager} + * @readonly + */ + get children() { + return new CategoryChannelChildManager(this); + } } module.exports = CategoryChannel;