Modify Items

Modify Items

Give, take, or set items in a user's inventory

Fields

FieldTypeRequiredDescription
operationenum: add | remove | setyesInventory mutation type.
selectionModeenum: all | weighted | randomyesall applies every listed item; weighted/random draw count items from items.
countnumber (as string)noHow many items to draw when selectionMode isn't 'all'. Capped at 100.
itemsarray of {name, amount, weight?}yesEvery item must exist in the guild's item cache. amount capped at 10,000.
targetUserIdstring or {path}noCross-user write target.

Example

{
  "id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
  "type": "modify_items",
  "operation": "add",
  "selectionMode": "all",
  "items": [
    {
      "name": "Sword",
      "amount": 1
    }
  ]
}

Did this page help you?