const { MessageEmbed } = require('discord.js'); module.exports = { name: "stats", debug: true, description: "check bot statistics", usage: "", permissions: { channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], member: [], }, SlashCommand: { options: [], /** * * @param {require("../structures/QuarksBot")} client * @param {import("discord.js").MessageCreate} message * @param {string[]} args * @param {*} param3 */ 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 end = new Date().getTime(); const stats = new MessageEmbed() .setColor(client.config.EmbedColor) .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] }) }, }, }