mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor(Channel): change channel types to UPPER_CASE (#6035)
This commit is contained in:
@@ -1358,12 +1358,12 @@ class Guild extends AnonymousGuild {
|
||||
* @private
|
||||
*/
|
||||
_sortedChannels(channel) {
|
||||
const category = channel.type === ChannelTypes.CATEGORY;
|
||||
const category = channel.type === ChannelTypes.GUILD_CATEGORY;
|
||||
return Util.discordSort(
|
||||
this.channels.cache.filter(
|
||||
c =>
|
||||
(['text', 'news', 'store'].includes(channel.type)
|
||||
? ['text', 'news', 'store'].includes(c.type)
|
||||
(['GUILD_TEXT', 'GUILD_NEWS', 'GUILD_STORE'].includes(channel.type)
|
||||
? ['GUILD_TEXT', 'GUILD_NEWS', 'GUILD_STORE'].includes(c.type)
|
||||
: c.type === channel.type) &&
|
||||
(category || c.parent === channel.parent),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user