Item
Field | Type | Description |
---|---|---|
id | snowflake | Unique ID of item |
name | string | Item name (between 3 and 100 characters) |
price | number | Item price |
description | string | Item description (between 0 and 1,000 characters) |
is_inventory | boolean | If this will be an inventory item |
is_usable | boolean | If this item can be used (only if is_inventory = true) |
is_sellable | boolean | If the item can be sold (only if is_inventory = true) |
stock_remaining | number | Quantity of stock remaining (only if unlimited_stock = false) |
unlimited_stock | boolean | If the stock for this item is unlimited |
requirements | array of Item Requirement | List of requirements to buy or use this item |
actions | array of Item Action | List of actions to perform when buying or using this item |
expires_at | ISO 8601 timestamp | Timestamp of when to delete this item from the store |
emoji_unicode | string | Unicode emoji to use for the icon |
emoji_id | snowflake | Discord emoji ID to use for the icon |
Item Requirement
Field | Type | Requirement Type |
---|---|---|
type | Requirement Type | |
match_type | Match Type | |
ids | array of snowflakes | ROLE ITEM |
balance | number | BALANCE |
Requirement Type
Name | Value | Description |
---|---|---|
ROLE | 1 | Discord role |
TOTAL_BALANCE | 2 | Total balance |
ITEM | 3 | Inventory item |
Match Type
Name | Value | Description |
---|---|---|
EVERY | 1 | Must match all ids |
AT_LEAST_ONE | 2 | At least one id must match |
NONE | 3 | None of the ids can match |
Item Action
Field | Type | Action Type |
---|---|---|
type | Action Type | |
message | Discord message object (content, embeds) | RESPOND |
ids | array of snowflakes | ADD_ROLES REMOVE_ROLES ADD_ITEMS REMOVE_ITEMS |
balance | number | ADD_BALANCE REMOVE_BALANCE |
Action Type
Name | Value | Description |
---|---|---|
RESPOND | 1 | Send or follow-up with a message |
ADD_ROLES | 2 | Add roles to the user |
REMOVE_ROLES | 3 | Remove roles from the user |
ADD_BALANCE | 4 | Add money to their cash balance |
REMOVE_BALANCE | 5 | Remove money from their cash balance |
ADD_ITEMS | 6 | Add items to their inventory |
REMOVE_ITEMS | 7 | Remove items from their inventory |