diff --git a/docs/discord-social-sdk/development-guides/managing-game-invites.mdx b/docs/discord-social-sdk/development-guides/managing-game-invites.mdx index 3b3bda93e8..089a4914be 100644 --- a/docs/discord-social-sdk/development-guides/managing-game-invites.mdx +++ b/docs/discord-social-sdk/development-guides/managing-game-invites.mdx @@ -456,6 +456,18 @@ yourgame://_discord/join?secret=the_join_secret_you_set --- +## Setting a Cover Image for the Invite (Optional) + +You can set a cover image for an invite via rich presence activity. This image displays as the banner on the invite and helps draw attention to it. Setting a cover image via rich presence allows you to dynamically customize invites per rich presence activity; for example, showing different images based on game mode, map, etc. rather than using the same static image for all invites. If not set, the banner falls back to the "Rich Presence Invite Image" configured in the Developer Portal under the "Rich Presence" tab. Setting an invite cover image is entirely optional. + +```cpp +discordpp::ActivityAssets assets; +assets.SetInviteCoverImage("invite-cover-image"); // This example uses an asset key, but you can use an external URL asset for more dynamic cover images. +activity.SetAssets(assets); +``` + +--- + ## Next Steps 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 d89dcdfc72..540c6a973b 100644 --- a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx +++ b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx @@ -146,7 +146,7 @@ activity.SetTimestamps(timestamps); ## Setting Assets -Once you've uploaded assets to your app, you can reference them using their **asset key** in your code to set custom artwork in Rich Presence. Here's an example of an asset with the key of "map-mainframe" and "tank-avatar": +Once you've uploaded assets to your app, you can reference them using their **asset key** in your code to set custom artwork in Rich Presence. Here's an example of an asset with the key of "map-mainframe", "tank-avatar", and "invite-cover-image": ```cpp // Setting Activity Assets @@ -155,6 +155,7 @@ assets.SetLargeImage("map-mainframe"); assets.SetLargeText("Mainframe"); assets.SetSmallImage("tank-avatar"); assets.SetSmallText("Tank"); +assets.SetInviteCoverImage("invite-cover-image"); // Used for Game Invites activity.SetAssets(assets); ``` diff --git a/docs/events/gateway-events.mdx b/docs/events/gateway-events.mdx index 7af0d0ba37..406873837e 100644 --- a/docs/events/gateway-events.mdx +++ b/docs/events/gateway-events.mdx @@ -1219,14 +1219,15 @@ For Listening and Watching activities, you can include both start and end timest ###### Activity Assets -| Field | Type | Description | -|--------------|--------|----------------------------------------------------------------------------------------------| -| large_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | -| large_text? | string | Text displayed when hovering over the large image of the activity | -| large_url? | string | URL that is opened when clicking on the large image | -| small_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | -| small_text? | string | Text displayed when hovering over the small image of the activity | -| small_url? | string | URL that is opened when clicking on the small image | +| Field | Type | Description | +|---------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| large_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | +| large_text? | string | Text displayed when hovering over the large image of the activity | +| large_url? | string | URL that is opened when clicking on the large image | +| small_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | +| small_text? | string | Text displayed when hovering over the small image of the activity | +| small_url? | string | URL that is opened when clicking on the small image | +| invite_cover_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image). Displayed as a banner on a [Game Invite](/docs/discord-social-sdk/development-guides/managing-game-invites). | ###### Activity Asset Image