Monetization
entitlementType
$entitlementType
Gives the Discord type of the active entitlement of a SKU, as a number. Bot Creator extension (not in the official BDFD wiki). Purchases happen at Discord: create the SKU in the Discord developer portal (Monetization). A right is active when it is not deleted, already started and not ended. Without a user or server argument, the author of the run is checked.
Syntax
$entitlementType[skuID;userID;serverID]
Parameters
| Parameter | Description |
|---|---|
skuID |
Required. The SKU ID. |
userID |
Optional. The user. Empty: the author of the run, unless a server is given. |
serverID |
Optional. The server. |
Return Value
- Type: String
- The Discord entitlement type:
1purchase,2premium subscription,3developer gift,4test mode purchase,5free purchase,6user gift,7premium purchase,8application subscription. Empty when there is no active right.
Examples
$if[$entitlementType[1234567890123456789]==4]
$sendMessage[Test purchase.]
$endif
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.