Modular, production-ready Discord bot for a shop / marketplace / community. Built in phases.
/shop browse, /shop view, /shop buy, /shop product-add/order view (receipt), /order history, /order update, statuses/customer view|history|notestd/sqlite): customers, products, ordersmain.ts HTTP endpoint — verify, PING, route commands/components/modals
lib/verify.ts Ed25519 signature verification + freshness check
lib/commands.ts slash-command registry + permission helper + dispatcher
lib/components.ts button / select / modal routing (custom_id tags)
lib/embeds.ts one shared premium embed/UI builder
lib/config.ts persistent config (std/blob)
lib/db.ts SQLite schema + repositories (customers/products/orders)
lib/shop.ts product management + browsing
lib/orders.ts buy flow, receipts, order updates
lib/customers.ts customer profiles & history
| Command | Access | Purpose |
|---|---|---|
/ping | all | health check |
/setup | all | run setup + config summary |
/panel | staff/owner | control panel |
/shop browse | all | catalogue |
/shop view <product> | all | product detail |
/shop buy <product> [qty] | all | place an order |
/shop product-add … | staff | add a product |
/order view <order> | owner | receipt |
/order history [customer] | all | order history |
/order update <order> <status> | staff | change order status |
/customer view [customer] | all | customer profile |
/customer history <customer> | staff | full history |
/customer note <customer> <note> | staff | staff note |
/moderation warn <user> | staff | issue a warning (case) |
/moderation ban <user> | staff | ban + case |
/moderation kick <user> | staff | kick + case |
/moderation timeout <user> [min] | staff | timeout + case |
/moderation cases [user] | staff | moderation case log |
/ticket new [category] [subject] | all | open a ticket |
/ticket close [id] | all | close your ticket |
/giveaway create <prize> [min] [winners] | staff | start a giveaway |
/giveaway enter <id> | all | enter a giveaway |
/giveaway end/reroll <id> | staff | end/reroll a giveaway |
/suggestion submit <text> | all | submit a suggestion |
/suggestion vote <id> [up/down] | all | vote on a suggestion |
/poll create <question> <options> | all | create a poll |
/poll vote <id> <letter> | all | vote on a poll |
/review add <order> [rating] [text] | all | review a completed order |
/promotion create/status … | staff | promotions |
/autorole add/remove/list/enable/disable/test/settings | staff | autorole system |
Autorole note: applying roles on raw member-join needs a persistent Discord gateway connection, which Val Town's serverless interaction endpoints don't provide.
/autorole testapplies + validates on demand;applyAutoroles(guildId, userId)inlib/autorole.tsis the hook a gateway worker would call on join.
Tickets (+ transcripts + ratings) · Giveaways · Welcome/Leave · Automod/Anti-raid/Anti-nuke · Applications · Reports · Reviews · Trading/Middleman · Promotions · Roles/VIP · Suggestions/Polls · Custom commands · Scheduled announcements · Logging · Analytics · Owner tools · Blacklist · Backup/Restore · Workflow engine · Web dashboard
DISCORD_PUBLIC_KEY, DISCORD_BOT_TOKEN, DISCORD_APP_ID, DISCORD_OWNER_ID🔴 Rotate your bot token — it was exposed in chat earlier. Secrets live only in env vars.