fix(CategoryChannel): set the type to 'category' and document its type

This commit is contained in:
Pascal
2018-01-20 23:27:18 +01:00
parent 6e10d258b6
commit b5ff309bf9
2 changed files with 5 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ const GuildChannel = require('./GuildChannel');
* @extends {GuildChannel} * @extends {GuildChannel}
*/ */
class CategoryChannel extends GuildChannel { class CategoryChannel extends GuildChannel {
constructor(guild, data) {
super(guild, data);
this.type = 'category';
}
/** /**
* The channels that are part of this category * The channels that are part of this category
* @type {?Collection<Snowflake, GuildChannel>} * @type {?Collection<Snowflake, GuildChannel>}

View File

@@ -19,6 +19,7 @@ class Channel {
* * `group` - a Group DM channel * * `group` - a Group DM channel
* * `text` - a guild text channel * * `text` - a guild text channel
* * `voice` - a guild voice channel * * `voice` - a guild voice channel
* * `category` - a guild category channel
* @type {string} * @type {string}
*/ */
this.type = null; this.type = null;