interactions.py
interactions.py copied to clipboard
feat: add entitlement/app subscription support
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
toInteractionContext
. I'm unsure of the naming here, but I can't think of another good name to use. - Added
entitlements
as an attribute toBaseInteractionContext
. - 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.
- Methods have been added to
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
Thanks to @Wolfhound905, I was able to test it and fix a few bugs. This should be ready for review.
LGTM, as far as I can see and test to a degree, merging 👍🏻