From 9b7363f9f1a2f16f8c171f6ecf099dc17de0bedb Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 10 Jul 2025 17:19:17 -0400 Subject: [PATCH 1/7] add examples for social sdk --- .../setting-rich-presence.mdx | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx index 003fa20a70..1bd938bd85 100644 --- a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx +++ b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx @@ -247,6 +247,46 @@ client->UpdateRichPresence( ``` --- +## Setting Field URLs + +You can set URLs for `details`, `state`, `assets.large_image` and `assets.small_image` in Rich Presence. When present, these URLs will make the corresponding image/text into clickable links. + +```cpp +activity.SetState("Playing on Mainframe"); +activity.SetStateUrl("https://example.com/maps/mainframe"); +activity.SetDetails("Rank #1337 in global leaderboard"); +activity.SetDetailsUrl("https://example.com/leaderboard/global"); + +discordpp::ActivityAssets assets; +assets.SetLargeImage("map-mainframe"); +assets.SetLargeText("Mainframe"); +assets.SetLargeUrl("https://example.com/maps/mainframe"); +assets.SetSmallImage("tank-avatar"); +assets.SetSmallText("Tank"); +assets.SetSmallUrl("https://example.com/classes/tank"); + +activity.SetAssets(assets); +``` + +--- + +## Configuring Status Text + +By default, Rich Presence will display the game's name in the user's status text. You can override this behavior by setting a status display type. + +```cpp +// uses the game's name in the status text (default) +activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::Name); + +// uses the activity's state field in the status text +activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::State); + +// uses the activity's details field in the status text +activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::Details); +``` + +--- + ## Next Steps Now that you've set up Rich Presence, you might want to explore: From 3c0518717be1959c25295fdb38f320e55ffdf837 Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 10 Jul 2025 17:31:08 -0400 Subject: [PATCH 2/7] add to gateway events --- docs/events/gateway-events.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/events/gateway-events.mdx b/docs/events/gateway-events.mdx index 8a057dddf6..3ccf1887a9 100644 --- a/docs/events/gateway-events.mdx +++ b/docs/events/gateway-events.mdx @@ -1174,8 +1174,16 @@ Bot users are only able to set `name`, `state`, `type`, and `url`. | 4 | Custom | `{emoji}` `{state}` | ":smiley: I am cool" | | 5 | Competing | Competing in `{name}` | "Competing in Arena World Champions" | +###### Status Display Types + +| ID | Name | Example | +|----|---------|----------------------------------------| +| 0 | Name | "Listening to Spotify" | +| 1 | State | "Listening to Rick Astley" | +| 2 | Details | "Listening to Never Gonna Give You Up" | + :::info -The streaming type currently only supports Twitch and YouTube. Only `https://twitch.tv/` and `https://youtube.com/` urls will work. +This applies to all activity types. "Listening" was used to serve as a consistent example of what the different fields might be used for. ::: ###### Status Display Types From dfc522760f5328c0e211d5e6455443f410284377 Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 10 Jul 2025 18:21:50 -0400 Subject: [PATCH 3/7] add changelog entry --- ...inks-and-customizable-statuses-in-activities.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md diff --git a/docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md b/docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md new file mode 100644 index 0000000000..4f24f84efd --- /dev/null +++ b/docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md @@ -0,0 +1,14 @@ +--- +title: "Clickable Links and Customizable Statuses in Activities" +date: "2025-07-10" +topics: +- "Activities" +- "Discord Social SDK" +- "Embedded App SDK" +--- + +We've added new functionality to Rich Presences to give users of your application a more interactive and flexible experience. There are two big changes as part of this: +- You can now add clickable links to the state text, details text, large image & small image +- You can now choose which field (name, state, or details) is used in users' status text (e.x. instead of "Listening to MyMusic" you can now have your status text show "Listening to Rick Astley") + +All of these new fields are documented on the [Activity Object](/docs/events/gateway-events#activity-object) section of Gateway Events. \ No newline at end of file From 3b5e08490c7277450657e7452c211ab74d6bc63e Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 10 Jul 2025 18:23:49 -0400 Subject: [PATCH 4/7] split out social sdk changes into separate pr --- .../setting-rich-presence.mdx | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx index 1bd938bd85..003fa20a70 100644 --- a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx +++ b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx @@ -247,46 +247,6 @@ client->UpdateRichPresence( ``` --- -## Setting Field URLs - -You can set URLs for `details`, `state`, `assets.large_image` and `assets.small_image` in Rich Presence. When present, these URLs will make the corresponding image/text into clickable links. - -```cpp -activity.SetState("Playing on Mainframe"); -activity.SetStateUrl("https://example.com/maps/mainframe"); -activity.SetDetails("Rank #1337 in global leaderboard"); -activity.SetDetailsUrl("https://example.com/leaderboard/global"); - -discordpp::ActivityAssets assets; -assets.SetLargeImage("map-mainframe"); -assets.SetLargeText("Mainframe"); -assets.SetLargeUrl("https://example.com/maps/mainframe"); -assets.SetSmallImage("tank-avatar"); -assets.SetSmallText("Tank"); -assets.SetSmallUrl("https://example.com/classes/tank"); - -activity.SetAssets(assets); -``` - ---- - -## Configuring Status Text - -By default, Rich Presence will display the game's name in the user's status text. You can override this behavior by setting a status display type. - -```cpp -// uses the game's name in the status text (default) -activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::Name); - -// uses the activity's state field in the status text -activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::State); - -// uses the activity's details field in the status text -activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::Details); -``` - ---- - ## Next Steps Now that you've set up Rich Presence, you might want to explore: From 43bf3adddc693a6e4bc67d8e4abffcd8f8fdff32 Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 10 Jul 2025 18:25:18 -0400 Subject: [PATCH 5/7] add back social sdk changes --- .../setting-rich-presence.mdx | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx index 003fa20a70..1bd938bd85 100644 --- a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx +++ b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx @@ -247,6 +247,46 @@ client->UpdateRichPresence( ``` --- +## Setting Field URLs + +You can set URLs for `details`, `state`, `assets.large_image` and `assets.small_image` in Rich Presence. When present, these URLs will make the corresponding image/text into clickable links. + +```cpp +activity.SetState("Playing on Mainframe"); +activity.SetStateUrl("https://example.com/maps/mainframe"); +activity.SetDetails("Rank #1337 in global leaderboard"); +activity.SetDetailsUrl("https://example.com/leaderboard/global"); + +discordpp::ActivityAssets assets; +assets.SetLargeImage("map-mainframe"); +assets.SetLargeText("Mainframe"); +assets.SetLargeUrl("https://example.com/maps/mainframe"); +assets.SetSmallImage("tank-avatar"); +assets.SetSmallText("Tank"); +assets.SetSmallUrl("https://example.com/classes/tank"); + +activity.SetAssets(assets); +``` + +--- + +## Configuring Status Text + +By default, Rich Presence will display the game's name in the user's status text. You can override this behavior by setting a status display type. + +```cpp +// uses the game's name in the status text (default) +activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::Name); + +// uses the activity's state field in the status text +activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::State); + +// uses the activity's details field in the status text +activity.SetStatusDisplayType(discordpp::StatusDisplayTypes::Details); +``` + +--- + ## Next Steps Now that you've set up Rich Presence, you might want to explore: From 3ea989fdb6b0bfdfb20e071507fb2f47e4319488 Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 28 Aug 2025 14:38:40 -0400 Subject: [PATCH 6/7] remove changelog --- ...inks-and-customizable-statuses-in-activities.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md diff --git a/docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md b/docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md deleted file mode 100644 index 4f24f84efd..0000000000 --- a/docs/change-log/2025-07-10-clickable-links-and-customizable-statuses-in-activities.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Clickable Links and Customizable Statuses in Activities" -date: "2025-07-10" -topics: -- "Activities" -- "Discord Social SDK" -- "Embedded App SDK" ---- - -We've added new functionality to Rich Presences to give users of your application a more interactive and flexible experience. There are two big changes as part of this: -- You can now add clickable links to the state text, details text, large image & small image -- You can now choose which field (name, state, or details) is used in users' status text (e.x. instead of "Listening to MyMusic" you can now have your status text show "Listening to Rick Astley") - -All of these new fields are documented on the [Activity Object](/docs/events/gateway-events#activity-object) section of Gateway Events. \ No newline at end of file From 3e1410d116824513c7a979d07ece51f685008aa0 Mon Sep 17 00:00:00 2001 From: foxfirecodes Date: Thu, 28 Aug 2025 14:39:37 -0400 Subject: [PATCH 7/7] revert gateway events changes --- docs/events/gateway-events.mdx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/events/gateway-events.mdx b/docs/events/gateway-events.mdx index 3ccf1887a9..8a057dddf6 100644 --- a/docs/events/gateway-events.mdx +++ b/docs/events/gateway-events.mdx @@ -1174,16 +1174,8 @@ Bot users are only able to set `name`, `state`, `type`, and `url`. | 4 | Custom | `{emoji}` `{state}` | ":smiley: I am cool" | | 5 | Competing | Competing in `{name}` | "Competing in Arena World Champions" | -###### Status Display Types - -| ID | Name | Example | -|----|---------|----------------------------------------| -| 0 | Name | "Listening to Spotify" | -| 1 | State | "Listening to Rick Astley" | -| 2 | Details | "Listening to Never Gonna Give You Up" | - :::info -This applies to all activity types. "Listening" was used to serve as a consistent example of what the different fields might be used for. +The streaming type currently only supports Twitch and YouTube. Only `https://twitch.tv/` and `https://youtube.com/` urls will work. ::: ###### Status Display Types