I have a problem with just a bit of my code:
JavaScript
x
2
1
<Client>.users.cache.size
2
It was working perfectly before but one day it begins to give me random numbers instead of the number of users the bot.
So I would like to fix this but I didn’t find how.
Advertisement
Answer
Try this, it is working:
JavaScript
1
2
1
<Client>.guilds.cache.reduce((a, b) => a + b.memberCount, 0)
2