From e926c7b5a856cb384bad201652d7d38cb9e81a68 Mon Sep 17 00:00:00 2001 From: Blocks <51055767+Blocksnmore@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:59:49 -0600 Subject: [PATCH] Add custom status support --- src/structures/presence.ts | 6 ++++++ src/types/presence.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/structures/presence.ts b/src/structures/presence.ts index 43935d07..b832a6a2 100644 --- a/src/structures/presence.ts +++ b/src/structures/presence.ts @@ -124,6 +124,12 @@ export class ClientPresence { else { activity.map((e) => { if (typeof e.type === 'string') e.type = ActivityTypes[e.type] + + if (e.type === ActivityTypes.CUSTOM_STATUS) { + e.state = e.name + e.name = 'Custom Status' + } + return e }) return activity diff --git a/src/types/presence.ts b/src/types/presence.ts index 08974888..7743f44c 100644 --- a/src/types/presence.ts +++ b/src/types/presence.ts @@ -72,6 +72,8 @@ export interface ActivityGame { name: string type: 0 | 1 | 2 | 3 | 4 | 5 | ActivityType url?: string + /** Used for CUSTOM_STATUS */ + state?: string } export interface ClientActivity {