-
Notifications
You must be signed in to change notification settings - Fork 412
Added support for premium apps #1555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “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? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Please resolve conflicts and lint |
|
Also need to update for when #1532 gets merged, see discord/discord-api-docs#7109 |
|
I wIll look into the pr's you sent later |
|
Hey!
With that said, I would like to keep this pull request open until #1532 is finalized. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive support for Discord's monetization features, enabling premium app functionality through entitlements, SKUs, and subscriptions.
- Adds new structures for Entitlement, SKU, and Subscription with corresponding CRUD operations
- Implements premium button type (ButtonStyles.PREMIUM) and new gateway events
- Extends User and Guild classes with entitlement management methods
Reviewed Changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/structures/User.js | Adds entitlement creation and retrieval methods for users |
| lib/structures/Subscription.js | New structure representing Discord subscriptions with billing periods |
| lib/structures/SKU.js | New structure for Stock Keeping Units with subscription management |
| lib/structures/Guild.js | Adds entitlement creation and retrieval methods for guilds |
| lib/structures/Entitlement.js | New structure representing app entitlements with consumption tracking |
| lib/rest/Endpoints.js | Adds API endpoints for entitlements, SKUs, and subscriptions |
| lib/gateway/Shard.js | Implements gateway event handlers for entitlement and subscription events |
| lib/Constants.js | Adds enums for entitlement types, SKU types, and subscription statuses |
| lib/Client.js | Implements client methods for entitlement and SKU management |
| index.js | Exports new structures for CommonJS usage |
| esm.mjs | Exports new structures for ES module usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated no new comments.
Wanna Make Some Money?
This pull request adds support for discord's monetization features, it adds entitlement and sku structures, the new premium button type and the three new events
ENTITLEMENT_CREATE,ENTITLEMENT_UPDATEandENTITLEMENT_DELETE.