mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 22:15:29 +00:00
fix: fixed /guilds command slicing array before sorting
This commit is contained in:
1 parent
18504f46d7
commit
7e1054dbda
1 file changed
+5
-2
@@ -31,9 +31,12 @@ module.exports = {
|
|||||||
memberCount: guild.memberCount
|
memberCount: guild.memberCount
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.slice(0, 50)
|
|
||||||
.sort((a, b) => b.memberCount - a.memberCount)
|
.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');
|
.join('\n');
|
||||||
|
|
||||||
let embedDescription = `**${embedIcons.bot} ${
|
let embedDescription = `**${embedIcons.bot} ${
|
||||||
|
|||||||
Reference in new issue
Block a user