/add-item — Add Product (Admin)
Type: Admin slash command → Modal
Scope: Admin role only
Description
Opens a Discord modal that collects the minimum information needed to create a draft product. The product is created in isActive=false, isPublished=false state. The admin then uploads an image and publishes via AdminJS.
Usage
/add-item
A 5-field modal appears:
| Field | Description |
|---|---|
| Product Name | Required, max 100 chars |
| Description | Optional, max 500 chars, multiline |
| Price (cents) | Required, e.g. 999 = $9.99 |
| Cost (cents, internal) | Required, e.g. 500 |
| Initial Qty + Visibility | Space-separated, e.g. 10 inherit or 0 public. Visibility: inherit, public, private |
Behavior
- Admin-only.
- Creates a
Productdocument with:isActive = false,isPublished = false(draft state)skuauto-generated asDRAFT-<id>- Currency defaults to
USD
- If initial qty > 0, creates an
InventoryTransactionof typeADJUSTMENT. - Responds ephemerally with the AdminJS deep-link to upload an image and publish:
Draft product <name> created. Upload image & publish it in AdminJS:https://<base>/admin/resources/Product/records/<id>/show
- Also DMs the admin if a bot token is available.
Publishing a draft
- Click the AdminJS link in the confirmation message.
- Upload a product image via the image field.
- Set
isActive = trueandisPublished = true, then Save.
Permissions
Requires admin role (botConfig.adminRoleIds).