interactions-py / interactions.py

A highly extensible, easy to use, and feature complete bot framework for Discord
https://interactions-py.github.io/interactions.py/
MIT License
839 stars 184 forks source link

feat: add premium buttons #1701

Closed AstreaTSS closed 4 months ago

AstreaTSS commented 4 months ago

Pull Request Type

Description

Discord added a premium upsell button style for components. This PR adds them and notes the deprecation of the PREMIUM_REQUIRED response (noted in the changelog linked).

Changes

Related Issues

Resolves #1702.

Test Scenarios

import interactions as ipy

@ipy.slash_command("test", description="test!")
async def test(ctx: ipy.SlashContext):
    button = ipy.Button(style=ipy.ButtonStyle.PREMIUM, sku_id="SKU_ID")
    await ctx.send("test!", components=[button])

Python Compatibility

Checklist