Skip to content

Conversation

AstreaTSS
Copy link
Member

@AstreaTSS AstreaTSS commented Jun 17, 2024

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

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

  • Add PREMIUM = 6 to ButtonStyles.
  • Added sku_id to Button.
    • Checks were also adjusted or added to note the presence of it.

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

  • I've ensured my code works on Python 3.10.x - kind of? I can't test the button sending, but I do get the correct errors, so...
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@silasary silasary merged commit a1263df into interactions-py:unstable Jun 20, 2024
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.

2 participants