yabatanPeanut
yabatanPeanut

Reputation: 3

How to get the last online status of an user with JDA( Java discord API)

How can I get the last online status of an user in a guild by using JDA? I mean, not the current online status but when was the last time that the user was online.

I searched on Google but didn't find any solution.

Thanks

Upvotes: 0

Views: 4768

Answers (1)

Pedro Fracassi
Pedro Fracassi

Reputation: 3925

Discord does not provide that information through their API, so you'll have to watch for PRESENCE_UPDATE (or UserUpdateOnlineStatusEvent in JDA) events from the gateway and store timestamps in a database whenever someone goes offline.

Upvotes: 1

Related Questions