Skip to content

Commit

Permalink
fix(Guild): sort text, news, and store channels together (#4070)
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Apr 16, 2020
1 parent 2e5a647 commit fcacf1b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/structures/Guild.js
Expand Up @@ -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),
),
);
}
}
Expand Down

0 comments on commit fcacf1b

Please sign in to comment.