interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

feat: add entitlement/app subscription support

Open AstreaTSS opened this issue 4 months ago • 1 comments

Pull Request Type

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

Checklist

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

AstreaTSS avatar Feb 21 '24 20:02 AstreaTSS

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

AstreaTSS avatar Feb 21 '24 20:02 AstreaTSS

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

FayeDel avatar Mar 11 '24 20:03 FayeDel