Inventory
Properties
Section titled “Properties”Type: Bot
availableSlots Getter
Section titled “availableSlots ”The number of available slots in the player’s inventory.
Type: number
items Getter
Section titled “items ”Gets items in the Inventory of the current player.
Type: InventoryItem[]
totalSlots Getter
Section titled “totalSlots ”The total slots available in the player’s inventory.
Type: number
usedSlots Getter
Section titled “usedSlots ”The number of used slots in the player’s inventory.
Type: number
Methods
Section titled “Methods”contains
Section titled “contains”Whether an item meets the quantity in the inventory.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| itemKey | string | number | The name or ID of the item. | ||
| quantity | number | ✓ | 1 | The quantity of the item. |
Returns: boolean
Equips an item from the inventory.
| Parameter | Type | Description |
|---|---|---|
| itemKey | string | number | The name or ID of the item. |
Returns: Promise<void>
Resolves for an Item in the Inventory.
| Parameter | Type | Description |
|---|---|---|
| key | string | number | The name or ID of the item. |
Returns: InventoryItem | null