disnake
disnake copied to clipboard
feat(activity): improve custom asset image support
Summary
Adds support for mp: activity asset IDs, see https://discord.com/developers/docs/topics/gateway#activity-object-activity-asset-image.
There are also twitch:, youtube:, and spotify: prefixes, each with their own external asset url pattern, but Discord intentionally did not document them (do we want to add them regardless?). Still, if they ever do get documented, this code makes it easy to add new external asset ID types.
Checklist
- [x] If code changes were made, then they have been tested
- [ ] I have updated the documentation to reflect the changes
- [x] I have formatted the code properly by running
task lint - [x] I have type-checked the code by running
task pyright
- [ ] This PR fixes an issue
- [x] This PR adds something new (e.g. new method or parameters)
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)
@shiftinv why is this a draft/blocked?
This still needs a small update to accommodate for a change I couldn't make in #685 regarding asset handling, since that change depends on both PRs
versionchanged are out of date
updated