mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 07:02:00 +00:00
22 lines
519 B
JavaScript
22 lines
519 B
JavaScript
const GuildChannel = require('./GuildChannel');
|
|
|
|
/**
|
|
* Represents a guild category channel on Discord.
|
|
* @extends {GuildChannel}
|
|
*/
|
|
class CategoryChannel extends GuildChannel {
|
|
constructor(guild, data) {
|
|
super(guild, data);
|
|
this.type = 'category';
|
|
}
|
|
/**
|
|
* The channels that are part of this category
|
|
* @type {?Collection<Snowflake, GuildChannel>}
|
|
* @readonly
|
|
*/
|
|
get children() {
|
|
return this.guild.channels.filter(c => c.parentID === this.id);
|
|
}
|
|
}
|
|
|
|
module.exports = CategoryChannel;
|