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.
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 <175728472+Copilot@users.noreply.github.com>
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.