Reputation: 11
So I went through the discord.js guide, and found that client.guilds.size
and client.users.size
is for finding no of users and servers a bot is on. But when I implement it I get "undefined". Any reason why?
Upvotes: 0
Views: 1600
Reputation: 471
Try client.guilds.cache.size
and client.users.cache.size
.
This changed in discord.js v12.
client.users has been changed from a Collection to a Manager.
client.guilds has been changed from a Collection to a Manager.
Upvotes: 1