diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 21ec24ed1..7c8f6852d 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1132,10 +1132,9 @@ class Guild extends Base { } _sortedChannels(channel) { - if (channel.type === Constants.ChannelTypes.CATEGORY) { - return Util.discordSort(this.channels.filter(c => c.type === Constants.ChannelTypes.CATEGORY)); - } - return Util.discordSort(this.channels.filter(c => c.parent === channel.parent)); + const category = channel.type === Constants.ChannelTypes.CATEGORY; + return Util.discordSort(this.channels.filter(c => + c.type === channel.type && (category || c.parent === channel.parent))); } }