Skip to content
vektorDocumentation

Shop

Server shop with items, roles, auctions and rental. Command: /shop.

Overview

The shop lets admins create items for members to buy. Server items (from admin) and P2P items (from members). Purchase with server currency. Access: /shop or /menu → Shop.

Item Types

4 item types: • ROLE — grants a Discord role on purchase. Requires roleId. • INTERNAL — internal item (badge, status, custom). No delivery needed. • EXTERNAL — external item (real goods, keys, services). Requires manual delivery. Status: PENDING_DELIVERY → DELIVERED. • STREAK_PROTECTION — protects daily bonus streak from one missed day.

Purchase

On purchase, checks: • Sufficient balance (after discount) • Item in stock • Per-user purchase limit not exceeded • Requirements met • Currency has the shop flag Payment is frozen then deducted. For P2P items, seller receives payment minus commission.

Actions on Purchase

Automatic actions on purchase (purchaseActions): • ADD_ROLE — grant a Discord role (specify roleId) • ADD_BALANCE — credit currency (specify currencyId and amount) • SEND_MESSAGE — send a message to a channel (specify channelId and message) Multiple actions can be combined.

Requirements

Purchase conditions (purchaseRequirements): • REQUIRE_ROLE — need a specific Discord role • REQUIRE_BALANCE — need minimum currency balance • REQUIRE_ITEM — need another shop item If a condition isn't met, purchase is rejected with the reason shown.

Discounts

Admins can create discounts on items or categories: • Discount percentage • Active period • Auto-applied on purchase Setup: Dashboard → Shop.

Role Rental

Temporary Discord role purchase. 3 periods: • 1 day — priceDay • 7 days — priceWeek • 30 days — priceMonth Role is automatically removed when the rental expires (via BullMQ scheduler). Setup: Dashboard → Shop → Role Rental.

Auctions

Auction-style item trading: • Starting price and minimum bid step • Reserve price — minimum for sale • Buyout price — instant purchase • Duration in hours • Anti-snipe — extends auction on last-minute bids Race condition protection via locks. Per-user active auction limit. Setup: Dashboard → Shop.

P2P Trading

Members can list their own items for sale: • sellerType: USER • P2P commission is configurable (shopP2PCommission) • Commission goes to server treasury Seller receives payment minus commission.

For Administrators

Dashboard → Shop: • Create and edit items • Actions and requirements editor • Discount management • Role rental • Auctions • P2P commission settings • Purchase history