mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
Better format on/ guilds system command
This commit is contained in:
1 parent
217e2f1c2a
commit
03d087518e
1 file changed
+10
-1
@@ -27,13 +27,22 @@ module.exports = {
|
||||
}
|
||||
|
||||
let guildsList = client.guilds.cache
|
||||
.map((guild) => {
|
||||
return {
|
||||
name: guild.name,
|
||||
memberCount: guild.memberCount
|
||||
}
|
||||
})
|
||||
.sort((a, b) => b.memberCount - a.memberCount)
|
||||
.map((guild) => `\`${guild.name} (#${guild.memberCount})\``)
|
||||
.join(', ');
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(`**Guilds**\n${guildsList}`)
|
||||
.setDescription(
|
||||
`**Guilds (${client.guilds.cache.size} total)**\n${guildsList}`
|
||||
)
|
||||
.setColor(embedColors.colorInfo)
|
||||
]
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user