Skip to content

Get correct count of all members that are not offline #9221

Closed Answered by sdanialraza
Steinente asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, PresenceStatus as stated here, only provides 4 statuses: online, idle, dnd, and offline, and it can also be null sometimes. It does not provide invisible. For all statuses, you'd just check if it's that value, so for online, you'd do if (status == "online") onlineMemberCount++. There's an exception for offline, as if the user is offline, it can either be null or offline, so you'd do if (!status | status == "offline") offlineMemberCount++. Hope this is helpful

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Steinente
Comment options

@sdanialraza
Comment options

@Steinente
Comment options

@sdanialraza
Comment options

Answer selected by Steinente
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants