I tried making a &bot-info
command to display the amount of members / channels / servers the bot is in, but every time i use the command it displays "0" for each value
const Discord = require('discord.js')
const client = new Discord.Client();
async function execute(message, args) {
const servers = await client.guilds.cache.size
const users = await client.users.cache.size
const textchannels = await client.channels.cache.size
const embed = new Discord.MessageEmbed()
.setTitle('Bot Stats')
.setColor('#000000')
.addFields(
{
name: ' Servers',
value: `Serving ${servers} servers.`,
inline: true
},
{
name: ' Channels',
value: `Serving ${textchannels} channels.`,
inline: true
},
{
name: ' Server Users',
value: `Serving ${users}`,
inline: true
}
)
await message.channel.send(embed)
}
module.exports = {
name: 'bot-info',
description: 'bot information',
execute
}
Message that the bot displays