/restock — Restock Product
Type: Admin slash command
Scope: Admin role only
Description
Adds quantity to a product's inventory snapshot and creates a RESTOCK transaction record. Also resets the lowStockAlertSent flag so future threshold crossings will re-fire an alert.
Usage
/restock product:<product-name> quantity:<positive-integer>
Both options have autocomplete / integer validation.
Behavior
- Admin-only: requires the user to have at least one role in
botConfig.adminRoleIds. - Validates
quantityis a positive integer (Zod schema). - Calls
InventoryService.restock()which:- Increments
quantityAvailableby the given amount. - Sets
lowStockAlertSent = false(resets alert gate). - Creates an
InventoryTransactionof typeRESTOCK.
- Increments
- Returns an ephemeral confirmation:
Restocked Widget: 5 → 12 units.
Permissions
Requires admin role (botConfig.adminRoleIds).
Related
/stock— check current qty- Inventory management