From 485dd718c57802ce620ec832cef8a708c711251a Mon Sep 17 00:00:00 2001 From: Souji Date: Fri, 25 Aug 2023 21:53:53 +0200 Subject: [PATCH] feat(Presence): Expose sync_id in Activity (#9766) * feat(Presence): Expose sync_id in Activity * chore: mention non-documentation --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --- 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..a73be719f2fd 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 property is not documented by Discord and 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 cfb64e6b44a3..8119271dec5c 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;