update stats/debug

This commit is contained in:
SowinskiBraeden committed 2022-08-01 14:18:05 -07:00
1 parent 51a81ad21c
commit 19c824c66a
3 files changed
+29 -21

No files matched your search

+12 -16
View File
@@ -18,28 +18,24 @@ module.exports = {
* @param {string[]} args
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }) => {
run: async (client, interaction, args, { GuildDB }, start) => {
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
return interaction.send(`You are not allowed to use the bot in this channel.`);
}
const data = `
\`\`\`
\n 𝗤𝘂𝗮𝗿𝗸𝘀𝗕𝗼𝘁 𝗦𝘁𝗮𝘁𝗶𝘀𝘁𝗶𝗰𝘀
╔══════════════╦══════════════╗
║ Channels ║${client.padding(client.channels.cache.size)}
╠══════════════╬══════════════╣
║ Servers ║${client.padding(client.guilds.cache.size)}
╠══════════════╬══════════════╣
║ Users ║${client.padding(client.users.cache.size)}
╚══════════════╩══════════════╝
\`\`\`
`
const end = new Date().getTime();
const stats = new MessageEmbed()
.setColor(client.config.EmbedColor)
.setDescription(data)
.setTitle('QuarksBot Statistics')
.addFields(
{ name: 'Guilds', value: `${client.guilds.cache.size}`, inline: true },
{ name: 'Channels', value: `${client.channels.cache.size}`, inline: true },
{ name: 'Users', value: `${client.users.cache.size}`, inline: true },
{ name: 'Latency', value: `${end - start}ms`, inline: true },
{ name: 'Uptime', value: `${client.secondsToDhms(process.uptime().toFixed(2))}`, inline: true },
{ name: 'Commands run', value: `${client.commandsRun}`, inline: true }
)
return interaction.send({ embeds: [stats] })
},
},