JDA
JDA copied to clipboard
Add missing features relating to premium app subscriptions
Pull Request Etiquette
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the contributing guidelines.
Changes
- [x] Internal code
- [x] Library interface (affecting end-user code)
- [x] Documentation
Description
This pull requests adds some features related to app subscriptions:
- retrieving single Entitlements (https://discord.com/developers/docs/game-sdk/store#get-entitlement)
- Consuming Entitlements (https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement)
- Creating Test Entitlements (https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement)
- Deleting Test Entitlements (https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement)
Please elaborate on use-cases for these features. None of these are part of the api spec, which makes me hesitate on supporting them.
I'll do my best here, personal opinion
- retrieving SKUs: Can be useful to see what packages you have to offer, maybe with a
/shopcommand? - user purchase discounts for SKUs: Useful for easily giving someone a discount based on factors an author decides on. Maybe they use the bot for a week and get a discount? Useful for automation.
- retrieving single Entitlements and their payment data: Useful to see if someone actually purchased, but doesn't the library do this? If it doesn't already exist, maybe show a
/profileand be able to see "Thanks for being premium :)" - Consuming Entitlements: Absolutely useful. Say they get a one time
/redeemusage, you'd want a way to automate that. The one-time thing is new, maybe that's not why it's in the spec?
I can sorta see how the last two could be useful, if you can't already do it on the dev dashboard. Say you have beta features but you want to give it to a server through an admin command, that could be allowed.
These are mostly examples but all could be justified in various degrees.