我正在尝试使我的不和谐机器人自动分别检索和更新行会,成员和机器人中的用户数量。
当我用alt测试时,任何通道的成员计数均未更新,我应该在同一代码中为单独的公会添加额外的通道,还是需要一些额外的代码才能将其获取到更新会员人数?
client.on('guildMemberAdd', member => {
member.guild.channels.get('516323954911346690' && '535841455353102337').setName(`(BI) Total Count: ${member.guild.memberCount}`);
let humans = member.guild.members.filter(m => !m.user.bot).size;
member.guild.channels.get('516323956110655529' && '535841456347414528').setName(`Member Count: ${humans}`);
let bots = member.guild.members.filter(m => m.user.bot).size;
member.guild.channels.get('516323953971560462' && '535841457140006935').setName(`Bot Count: ${bots}`);
});