mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
add channel categories (#1727)
* add channel categories * add specific class * speed * Update Channel.js * fix type typo * Update Channel.js * rewrite position stuff in prep for category sorting * fix small issues in generation of permissions * Update Guild.js * Update Constants.js * Update GuildChannel.js * doc fix * Update GuildChannel.js * <.<
This commit is contained in:
@@ -17,6 +17,7 @@ class Channel extends Base {
|
||||
* * `group` - a Group DM channel
|
||||
* * `text` - a guild text channel
|
||||
* * `voice` - a guild voice channel
|
||||
* * `category` - a guild category channel
|
||||
* * `unknown` - a generic channel of unknown type, could be Channel or GuildChannel
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -69,6 +70,7 @@ class Channel extends Base {
|
||||
const GroupDMChannel = require('./GroupDMChannel');
|
||||
const TextChannel = require('./TextChannel');
|
||||
const VoiceChannel = require('./VoiceChannel');
|
||||
const CategoryChannel = require('./CategoryChannel');
|
||||
const GuildChannel = require('./GuildChannel');
|
||||
const types = Constants.ChannelTypes;
|
||||
let channel;
|
||||
@@ -86,6 +88,9 @@ class Channel extends Base {
|
||||
case types.VOICE:
|
||||
channel = new VoiceChannel(guild, data);
|
||||
break;
|
||||
case types.CATEGORY:
|
||||
channel = new CategoryChannel(guild, data);
|
||||
break;
|
||||
default:
|
||||
channel = new GuildChannel(guild, data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user