From fcacf1bc0d9d9ccf7fae5594dfec16eebe5e93ff Mon Sep 17 00:00:00 2001 From: Advaith Date: Thu, 16 Apr 2020 01:35:19 -0700 Subject: [PATCH] fix(Guild): sort text, news, and store channels together (#4070) --- src/structures/Guild.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index ba32506f..e2bc8c47 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1335,7 +1335,13 @@ class Guild extends Base { _sortedChannels(channel) { const category = channel.type === ChannelTypes.CATEGORY; return Util.discordSort( - this.channels.cache.filter(c => c.type === channel.type && (category || c.parent === channel.parent)), + this.channels.cache.filter( + c => + (['text', 'news', 'store'].includes(channel.type) + ? ['text', 'news', 'store'].includes(c.type) + : c.type === channel.type) && + (category || c.parent === channel.parent), + ), ); } }