Skip to content

Conversation

@foxfirecodes
Copy link
Contributor

@foxfirecodes foxfirecodes commented Jul 10, 2025

as part of a change that just went out today, we now support new fields for rich presence activities:

  • state_url - URL that is linked to when clicking on the state text in the activity card
  • details_url - URL that is linked to when clicking on the details text in the activity card
  • assets.large_url - URL that is linked to when clicking on the large image in the activity card
  • assets.small_url - URL that is linked to when clicking on the small image in the activity card

this PR adds support for those fields to the embedded app sdk

there is a docs pr to update documentation here: discord/discord-api-docs#7674

Comment on lines 170 to +175
large_image: zod.string().nullable(),
large_text: zod.string().nullable(),
large_url: zod.string().url().optional().nullable(),
small_image: zod.string().nullable(),
small_text: zod.string().nullable(),
small_url: zod.string().url().optional().nullable(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure if we want only the _url fields to be optional but idk why some fields are only nullable and some fields are optional + nullable in the existing code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did optional + nullable to align with what details and state had -- i imagine the reason why large/small_image/text are nullable but not optional is that the intention is if (assets) { images & text should be defined }

@advaith1 advaith1 requested a review from afgiel July 10, 2025 22:38
Copy link
Collaborator

@afgiel afgiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@foxfirecodes foxfirecodes merged commit f81b623 into main Jul 11, 2025
4 checks passed
@foxfirecodes foxfirecodes deleted the lew/add-activity-url-fields branch July 11, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants