You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.
Please describe the bug or issue in as much detail as possible:
I was making an all cached users list using client.users.size, but the value was 3, when it should've been 2. Doing a bit more debugging, I figured out undefined was part of the client.users map, which could be found with client.users.get(undefined). The value of it was the bot itself.
Please include a reproducible code sample here, if possible:
client.users.get(undefined);
Further details:
Installed hiven.js version: ^2.0.11
Installed Node.js version: v14.17.0
Operating system: Windows 10
Workarounds
For any other Hiven bot developer struggling with this problem to get the maximum user size, I'm just using ${ client.users.get(undefined) ? client.users.size - 1 : client.users.size } for now to find the total user count.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please describe the bug or issue in as much detail as possible:
I was making an all cached users list using
client.users.size
, but the value was 3, when it should've been 2. Doing a bit more debugging, I figured out undefined was part of the client.users map, which could be found withclient.users.get(undefined)
. The value of it was the bot itself.Please include a reproducible code sample here, if possible:
Further details:
Workarounds
For any other Hiven bot developer struggling with this problem to get the maximum user size, I'm just using
${ client.users.get(undefined) ? client.users.size - 1 : client.users.size }
for now to find the total user count.The text was updated successfully, but these errors were encountered: