mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +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
|
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})\``)
|
.map((guild) => `\`${guild.name} (#${guild.memberCount})\``)
|
||||||
.join(', ');
|
.join(', ');
|
||||||
|
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(`**Guilds**\n${guildsList}`)
|
.setDescription(
|
||||||
|
`**Guilds (${client.guilds.cache.size} total)**\n${guildsList}`
|
||||||
|
)
|
||||||
.setColor(embedColors.colorInfo)
|
.setColor(embedColors.colorInfo)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user