Rack Lucifer
Rack Lucifer

Reputation: 11

Getting number of members and servers a bot is serving

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

Answers (1)

Florence Winters
Florence Winters

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

Related Questions