Add-Item command
this command would allow admins to add items in the shop.
/add item

Arguments and Permissions
Arguments
| Arguments | Description | Type | Values | Required |
|---|---|---|---|---|
id | id of the item - no special characters allowed | Text | Max Length : 50 | True |
name | name of item | Text | Max Length : 50 | |
price | price for the item | Whole Number | ||
description | short description of the item | Text | Max Length : 150 | |
reward_role | role to give as reward | Role | ||
required_role | role required to buy this item | Role | False | |
stock | remaining stock for the item | Whole Number | ||
response | extra notes to add in response when someone buys this item | Text | Max Length : 150 |
Command Permissions
MANAGE GUILD or ADMIN, modify it according to you.

Get Stored Variable
- Variable : shop
- Set Temporary Variable :
shop
Calculate Value
- Temporary Variable :
shop_item
let list = var('shop') ?? [];
let idregex = `[^a-zA-Z0-9\s]{1,}`;
let id = arg('id') | lower() | replace(" ", "_");
none(list, {.id == id}) && none(list, {.role == arg('reward_role').id}) && ! (arg('id') matches idregex) ?
concat(list, [
{
"id": arg('id') | lower() | replace(" ", "_"),
"name": arg('name'),
"stock": arg('stock'),
"role": arg('reward_role').id,
"require": arg('required_role')?.id,
"price": arg('price'),
"desc": arg('description'),
"response": arg('response')
}
])
:
"- IDs cannot have special characters + There cannot be two items with the same ID and reward role."
Comparison Condition
- Base Value :
{{type(var('shop_item'))}}
Match Condition
| Comparison Mode | Comparison Value |
|---|---|
| Equal | array |
-
Set stored variable
- Variable : shop
- Operation : Overwrite
- Value :
{{var('shop_item')}}
-
Create Response Message
- Add embed
- Embed Title :
done 👌 - Embed Description :
Embed Description
```json
{{var('shop_item') | last() | toJSON()}}```
Else
- Create Response Message
📋 Paste this in your response message
{{var('shop_item')}}