Discord.js机器人的状态为“监视(人类的数量)”

时间:2020-07-07 19:57:26

标签: node.js discord discord.js

这是我的状态:

bot.on("ready", async() => {
    console.log(`${bot.user.username} is online on ${bot.guilds.size} servers!`);
    bot.user.setActivity(`Azrael is ruling the world!`)
})

我想将其更改为监视该机器人所在的每个服务器中的成员总数,该怎么做?

1 个答案:

答案 0 :(得分:0)

您可以使用bot.users.cache.size

bot.user.setActivity(`Watching Over ${bot.users.cache.size}`)