mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user