【发布时间】:2021-06-01 19:57:01
【问题描述】:
我刚刚做了一个“公会”命令,它应该返回机器人所在的公会数量。
这是我的代码:
module.exports = {
name : 'guilds',
description : 'Returns the amount of guilds where the bot is',
execute(client, message, args) {
message.channel.send(`I am currently on ${client.guilds.cache.size} guilds!`)
}
}
我想测试它,所以运行它并将我的机器人添加到另一个公会,重新启动它,但它仍然返回相同的数字。不知道公会数量更新前会不会有延迟之类的情况?
或者我做错了什么?
【问题讨论】:
标签: discord discord.js bots