From 7e1054dbdad90e97ab058ade518146298296f6ab Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sat, 15 Jul 2023 14:46:25 +0200 Subject: [PATCH] fix: fixed /guilds command slicing array before sorting --- system-commands/guilds.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system-commands/guilds.js b/system-commands/guilds.js index 77ea5a5..1913166 100644 --- a/system-commands/guilds.js +++ b/system-commands/guilds.js @@ -31,9 +31,12 @@ module.exports = { memberCount: guild.memberCount }; }) - .slice(0, 50) .sort((a, b) => b.memberCount - a.memberCount) - .map((guild, index) => `${index + 1}. \`${guild.name} (#${guild.memberCount})\``) + .slice(0, 50) + .map( + (guild, index) => + `${index + 1}. \`${guild.name} (#${guild.memberCount})\`` + ) .join('\n'); let embedDescription = `**${embedIcons.bot} ${