Always have an online status
All checks were successful
Publish JS SDK / docker (push) Successful in 19s
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 1m0s

This commit is contained in:
Braydon 2024-09-09 20:58:14 -04:00
parent 372eaf589b
commit c090fc8820
3 changed files with 9 additions and 11 deletions

@ -51,9 +51,9 @@ public final class DiscordUser {
@NonNull private final String accentColor;
/**
* The online status of this user, if known.
* The online status of this user.
*/
private final OnlineStatus onlineStatus;
@NonNull private final OnlineStatus onlineStatus;
/**
* The clients this user is active on, if known.
@ -95,7 +95,11 @@ public final class DiscordUser {
Banner banner = profile.getBannerId() == null || profile.getBannerUrl() == null ? null : new Banner(profile.getBannerId(), profile.getBannerUrl());
String accentColor = String.format("#%06X", (0xFFFFFF & profile.getAccentColorRaw()));
OnlineStatus onlineStatus = member == null ? null : member.getOnlineStatus();
OnlineStatus onlineStatus = member == null ? OnlineStatus.OFFLINE : member.getOnlineStatus();
if (onlineStatus == OnlineStatus.UNKNOWN) {
onlineStatus = OnlineStatus.OFFLINE;
}
EnumSet<ClientType> activeClients = member == null ? null : member.getActiveClients();
List<Activity> activities = member == null ? null : member.getActivities();
SpotifyActivity spotify = null;

@ -1,6 +1,6 @@
{
"name": "usetether",
"version": "1.1.8",
"version": "1.1.9",
"author": "Braydon (Rainnny) <braydonrainnny@gmail.com>",
"description": "An API designed to provide real-time access to a user's Discord data.",
"keywords": [

@ -37,13 +37,7 @@ export type DiscordUser = {
/**
* The online status of this user, if known.
*/
onlineStatus:
| "ONLINE"
| "IDLE"
| "DO_NOT_DISTURB"
| "OFFLINE"
| "UNKNOWN"
| undefined;
onlineStatus: "ONLINE" | "IDLE" | "DO_NOT_DISTURB" | "OFFLINE";
/**
* The clients this user is active on, if known.