Skip to content

feat: add entitlement/app subscription support #1617

New issue

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

By clicking “No 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? No Sign in to your account

Merged
merged 11 commits into from
Mar 11, 2024

Conversation

AstreaTSS
Copy link
Member

@AstreaTSS AstreaTSS commented Feb 21, 2024

Pull Request Type

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

Description

Adds support for entitlements, otherwise known as App Subscriptions, into interactions.py.

Changes

  • Added the Entitlement object.
  • Added entitlement creation, update, and deletion events.
  • Added send_premium_required to InteractionContext. I'm unsure of the naming here, but I can't think of another good name to use.
  • Added entitlements as an attribute to BaseInteractionContext.
  • Added HTTP methods to list entitlements, as well as to create and delete test entitlements.
    • Methods have been added to Client to allow normal users to use them.

Related Issues

Resolves #1613.

Test Scenarios

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • 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

@AstreaTSS AstreaTSS marked this pull request as ready for review February 21, 2024 20:42
@AstreaTSS
Copy link
Member Author

Thanks to @Wolfhound905, I was able to test it and fix a few bugs. This should be ready for review.

Copy link
Member

@silasary silasary left a comment

Choose a reason for hiding this comment

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

I can't test, but this looks good to me

@FayeDel
Copy link
Collaborator

FayeDel commented Mar 11, 2024

LGTM, as far as I can see and test to a degree, merging 👍🏻

@FayeDel FayeDel merged commit b41c47e into interactions-py:unstable Mar 11, 2024
@AstreaTSS AstreaTSS deleted the entitlement-support branch March 12, 2024 03:49
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants