serenity-rs / serenity

A Rust library for the Discord API.
https://discord.gg/serenity-rs
ISC License
4.65k stars 571 forks source link

Add support for premium buttons #2905

Closed mkrasnitski closed 1 month ago

mkrasnitski commented 2 months ago

Fixes #2904

Adds support for the new premium buttons that replace the PREMIUM_REQUIRED interaction response type, which has been deprecated.

vicky5124 commented 2 months ago

Are there any use cases for the store link without a SKU? If there are, it may be worth implementing it, otherwise, it is fine to be left out IMO.

mkrasnitski commented 2 months ago

The store link does in fact get rendered as a rich embed too (docs), however I don't really know which struct would be best suited to have a method that returns the url.

vicky5124 commented 2 months ago

Both could either have an additional method, or make the existing url() method require a with_sku: bool argument.

Alternatively, or additively, IntegrationApplication, PartialCurrentApplicationInfo and CurrentApplicationInfo could have the method, as they hold the application ID.

mkrasnitski commented 1 month ago

Sorry for the delay, should be good for merge now.