From 34ef180c8ecf51dd8b1ccdb1adab1075a40176ab Mon Sep 17 00:00:00 2001 From: almostSouji Date: Sat, 12 Aug 2023 09:56:59 +0200 Subject: [PATCH 1/2] feat(Presence): Expose sync_id in Activity --- packages/discord.js/src/structures/Presence.js | 7 +++++++ packages/discord.js/typings/index.d.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/packages/discord.js/src/structures/Presence.js b/packages/discord.js/src/structures/Presence.js index 79ecb2918b3b..817cbc75beae 100644 --- a/packages/discord.js/src/structures/Presence.js +++ b/packages/discord.js/src/structures/Presence.js @@ -216,6 +216,13 @@ class Activity { */ this.party = data.party ?? null; + /** + * The sync id of the activity + * This represents the track id in spotify activities. + * @type {?string} + */ + this.syncId = data.sync_id ?? null; + /** * Assets for rich presence * @type {?RichPresenceAssets} diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index fda9b4c0860d..90132c2bee1a 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -264,6 +264,7 @@ export class Activity { size: [number, number]; } | null; public state: string | null; + public syncId: string | null; public timestamps: { start: Date | null; end: Date | null; From 67cb748839c1c0fc1c0c7a46ada04e04f37ffa7e Mon Sep 17 00:00:00 2001 From: almostSouji Date: Fri, 18 Aug 2023 19:16:28 +0200 Subject: [PATCH 2/2] chore: mention non-documentation --- packages/discord.js/src/structures/Presence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/structures/Presence.js b/packages/discord.js/src/structures/Presence.js index 817cbc75beae..a73be719f2fd 100644 --- a/packages/discord.js/src/structures/Presence.js +++ b/packages/discord.js/src/structures/Presence.js @@ -218,7 +218,7 @@ class Activity { /** * The sync id of the activity - * This represents the track id in spotify activities. + * This property is not documented by Discord and represents the track id in spotify activities. * @type {?string} */ this.syncId = data.sync_id ?? null;