diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index a938ef37f..30992fb96 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -50,15 +50,15 @@ class ClientDataManager { let channel; if (data.type === Constants.ChannelTypes.DM) { channel = new DMChannel(this.client, data); - } else if (data.type === Constants.ChannelTypes.groupDM) { + } else if (data.type === Constants.ChannelTypes.GROUP_DM) { channel = new GroupDMChannel(this.client, data); } else { guild = guild || this.client.guilds.get(data.guild_id); if (guild) { - if (data.type === Constants.ChannelTypes.text) { + if (data.type === Constants.ChannelTypes.TEXT) { channel = new TextChannel(guild, data); guild.channels.set(channel.id, channel); - } else if (data.type === Constants.ChannelTypes.voice) { + } else if (data.type === Constants.ChannelTypes.VOICE) { channel = new VoiceChannel(guild, data); guild.channels.set(channel.id, channel); } diff --git a/src/structures/PartialGuildChannel.js b/src/structures/PartialGuildChannel.js index 13cf4c2f9..4c634b981 100644 --- a/src/structures/PartialGuildChannel.js +++ b/src/structures/PartialGuildChannel.js @@ -37,7 +37,7 @@ class PartialGuildChannel { * The type of this guild channel - `text` or `voice` * @type {string} */ - this.type = Constants.ChannelTypes.text === data.type ? 'text' : 'voice'; + this.type = Constants.ChannelTypes.TEXT === data.type ? 'text' : 'voice'; } } diff --git a/src/util/Constants.js b/src/util/Constants.js index cc7569697..76bb705df 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -175,10 +175,10 @@ exports.Status = { }; exports.ChannelTypes = { - text: 0, + TEXT: 0, DM: 1, - voice: 2, - groupDM: 3, + VOICE: 2, + GROUP_DM: 3, }; exports.OPCodes = {