JDA icon indicating copy to clipboard operation
JDA copied to clipboard

Add missing features relating to premium app subscriptions

Open Tobias123567 opened this issue 1 year ago • 2 comments

Pull Request Etiquette

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)

Tobias123567 avatar Apr 27 '24 17:04 Tobias123567

Please elaborate on use-cases for these features. None of these are part of the api spec, which makes me hesitate on supporting them.

MinnDevelopment avatar Apr 28 '24 10:04 MinnDevelopment

I'll do my best here, personal opinion

  • retrieving SKUs: Can be useful to see what packages you have to offer, maybe with a /shop command?
  • 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 /profile and be able to see "Thanks for being premium :)"
  • Consuming Entitlements: Absolutely useful. Say they get a one time /redeem usage, 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.

Chew avatar Apr 29 '24 01:04 Chew