Modify Items
Modify Items
Give, take, or set items in a user's inventory
Fields
| Field | Type | Required | Description |
|---|---|---|---|
operation | enum: add | remove | set | yes | Inventory mutation type. |
selectionMode | enum: all | weighted | random | yes | all applies every listed item; weighted/random draw count items from items. |
count | number (as string) | no | How many items to draw when selectionMode isn't 'all'. Capped at 100. |
items | array of {name, amount, weight?} | yes | Every item must exist in the guild's item cache. amount capped at 10,000. |
targetUserId | string or {path} | no | Cross-user write target. |
Example
{
"id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
"type": "modify_items",
"operation": "add",
"selectionMode": "all",
"items": [
{
"name": "Sword",
"amount": 1
}
]
}Updated about 14 hours ago
Did this page help you?
