Skip to content

Commit

Permalink
docs: Fix malformed overridden documentation (#8954)
Browse files Browse the repository at this point in the history
* docs: override `resolve()` & `resolveId()`

* docs(CategoryChannel): move `setParent()` up

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Jiralite and kodiakhq[bot] committed Dec 24, 2022
1 parent 6614603 commit 0b8b114
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
36 changes: 18 additions & 18 deletions packages/discord.js/src/managers/AutoModerationRuleManager.js
Expand Up @@ -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] });
}
Expand Down Expand Up @@ -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;
18 changes: 9 additions & 9 deletions packages/discord.js/src/structures/CategoryChannel.js
Expand Up @@ -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.
* <warn>It is not currently possible to set the parent of a CategoryChannel.</warn>
Expand All @@ -27,6 +18,15 @@ class CategoryChannel extends GuildChannel {
* @param {SetParentOptions} [options={}] The options for setting the parent
* @returns {Promise<GuildChannel>}
*/

/**
* A manager of the channels belonging to this category
* @type {CategoryChannelChildManager}
* @readonly
*/
get children() {
return new CategoryChannelChildManager(this);
}
}

module.exports = CategoryChannel;

0 comments on commit 0b8b114

Please sign in to comment.