diff --git a/src/stores/ChannelStore.js b/src/stores/ChannelStore.js index 88c5a0bb3..aad7927aa 100644 --- a/src/stores/ChannelStore.js +++ b/src/stores/ChannelStore.js @@ -60,7 +60,7 @@ class ChannelStore extends DataStore { const channel = Channel.create(this.client, data, guild); if (!channel) { - this.client.emit(Events.DEBUG, `Failed to find guild for channel ${data.id} ${data.type}`); + this.client.emit(Events.DEBUG, `Failed to find guild, or unknown type for channel ${data.id} ${data.type}`); return null; } diff --git a/src/structures/Channel.js b/src/structures/Channel.js index b43411949..de5f462e8 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -116,12 +116,8 @@ class Channel extends Base { channel = new CategoryChannel(guild, data); break; } - default: { - const GuildChannel = Structures.get('GuildChannel'); - channel = new GuildChannel(guild, data); - } } - guild.channels.set(channel.id, channel); + if (channel) guild.channels.set(channel.id, channel); } } return channel; diff --git a/src/util/Structures.js b/src/util/Structures.js index 62646b404..5cdfc831a 100644 --- a/src/util/Structures.js +++ b/src/util/Structures.js @@ -75,7 +75,6 @@ const structures = { TextChannel: require('../structures/TextChannel'), VoiceChannel: require('../structures/VoiceChannel'), CategoryChannel: require('../structures/CategoryChannel'), - GuildChannel: require('../structures/GuildChannel'), GuildMember: require('../structures/GuildMember'), Guild: require('../structures/Guild'), Message: require('../structures/Message'), diff --git a/typings/index.d.ts b/typings/index.d.ts index d0383f694..f1547c876 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1735,7 +1735,6 @@ declare module 'discord.js' { TextChannel: typeof TextChannel; VoiceChannel: typeof VoiceChannel; CategoryChannel: typeof CategoryChannel; - GuildChannel: typeof GuildChannel; GuildMember: typeof GuildMember; Guild: typeof Guild; Message: typeof Message;