mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
* refactor: change `xID` to `xId` * Update src/managers/MessageManager.js Co-authored-by: Noel <buechler.noel@outlook.com> Co-authored-by: Noel <buechler.noel@outlook.com>
32 lines
862 B
JavaScript
32 lines
862 B
JavaScript
'use strict';
|
|
|
|
const GuildChannel = require('./GuildChannel');
|
|
|
|
/**
|
|
* Represents a guild category channel on Discord.
|
|
* @extends {GuildChannel}
|
|
*/
|
|
class CategoryChannel extends GuildChannel {
|
|
/**
|
|
* Channels that are a part of this category
|
|
* @type {Collection<Snowflake, GuildChannel>}
|
|
* @readonly
|
|
*/
|
|
get children() {
|
|
return this.guild.channels.cache.filter(c => c.parentId === this.id);
|
|
}
|
|
|
|
/**
|
|
* Sets the category parent of this channel.
|
|
* <warn>It is not currently possible to set the parent of a CategoryChannel.</warn>
|
|
* @method setParent
|
|
* @memberof CategoryChannel
|
|
* @instance
|
|
* @param {?(GuildChannel|Snowflake)} channel The channel to set as parent
|
|
* @param {SetParentOptions} [options={}] The options for setting the parent
|
|
* @returns {Promise<GuildChannel>}
|
|
*/
|
|
}
|
|
|
|
module.exports = CategoryChannel;
|