Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(RichPresenceAssets): add YouTube and custom image support #7184

Merged
merged 1 commit into from Jan 8, 2022

Conversation

Commandtechno
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
Added support for YouTube image URLs, and custom URLs in rich presence images similar to how the client does it.
You can now set the rich presence images as custom URLs which are prefixed with mp:

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Copy link
Contributor

@vvito7 vvito7 left a comment

Choose a reason for hiding this comment

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

Perhaps using cdn URL instead of media? Sorry if it's wrong

src/structures/Presence.js Outdated Show resolved Hide resolved
src/structures/Presence.js Outdated Show resolved Hide resolved
@Commandtechno
Copy link
Contributor Author

Commandtechno commented Jan 4, 2022

mp stands for media proxy thats why I went with it, but after testing, cdn.discordapp.com doesn't seem to work, I might also be missing something.

What I could do is extract the original URL from the media proxy URL, but I don't see anything wrong with the media proxy url either, but I don't see anything wrong with the media proxy url either.

Media proxy URL: https://media.discordapp.net/external/0g8mlaBL2Xax0nf8f1WjenSR9-SL4x98RSze3wxnF8I/https/cdn.discordapp.com/emojis/765141043603046420.gif

CDN URL: https://cdn.discordapp.com/external/0g8mlaBL2Xax0nf8f1WjenSR9-SL4x98RSze3wxnF8I/https/cdn.discordapp.com/emojis/765141043603046420.gif

@iCrawl iCrawl merged commit d06d70c into discordjs:main Jan 8, 2022
@TheGoodVillain

This comment has been minimized.

Jiralite added a commit to Jiralite/discord.js that referenced this pull request Feb 25, 2022
Commandtechno added a commit to Commandtechno/discord-api-docs that referenced this pull request Mar 8, 2022
This PR documents Twitch Stream Preview, YouTube Stream Preview, and Spotify Album Cover activity asset images.

Related discord.js pr: discordjs/discord.js#7184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

9 participants