Discord bot for running licitations (auctions) in a student organization. Items are auctioned not for money, but for goods needed at integrations (beer, snacks, drinks, etc.).
- A Discord forum channel is designated for auctions
- Each forum post is a separate auction offer
- Members bid using
/bid— bids are cumulative (everyone's bids stack up) - The last person to bid is the current winner
- Admins can set global limits per item (e.g. max 80 beers across all offers)
- Items that reached their limit are automatically hidden from autocomplete
| Command | Description |
|---|---|
/bid <item> [quantity=1] |
Bid on the current offer (autocomplete enabled) |
/offer-status |
Show aggregated bid summary for the current offer |
| Command | Description |
|---|---|
/admin toggle-bidding <enabled> |
Enable/disable bidding globally |
/admin close-offer |
Close bidding on the current offer |
/admin reopen-offer |
Reopen bidding on the current offer |
/admin remove-offer |
Delete the offer and all its bids |
/admin add-item <name> <slug> [emoji] [unit] [max-quantity] |
Add a new biddable item |
/admin remove-item <slug> |
Remove an item and all related bids |
/admin set-limit <slug> <quantity> |
Set global limit for an item (0 = no limit) |
/admin view-limits [slug] |
Show limits and usage for all or one item |
- Node.js 20+
- pnpm
- A Discord bot with the following permissions: Send Messages, Embed Links, Manage Messages, Read Message History
- A Discord server with a forum channel
pnpm installCopy .env.example to .env and fill in:
BOT_TOKEN=your-bot-token
CLIENT_ID=your-application-client-id
GUILD_ID=your-discord-server-id
FORUM_CHANNEL_ID=your-forum-channel-id
# Optional: use PostgreSQL instead of SQLite
# DATABASE_URL=postgresql://user:password@localhost:5432/licytownikSQLite (default) — no setup needed, database file is created automatically in data/.
PostgreSQL — set DATABASE_URL in .env. Generate migrations with:
pnpm db:generate:pg# Register slash commands (run once, or after command changes)
pnpm deploy-commands
# Start the bot (development)
pnpm dev
# Build and start (production)
pnpm build
pnpm start| Script | Description |
|---|---|
pnpm dev |
Start bot in dev mode (tsx) |
pnpm build |
Build for production (tsup) |
pnpm start |
Run production build |
pnpm deploy-commands |
Register slash commands with Discord |
pnpm db:generate |
Generate SQLite migrations |
pnpm db:generate:pg |
Generate PostgreSQL migrations |
- TypeScript + Node.js
- discord.js v14
- Drizzle ORM + SQLite (better-sqlite3) or PostgreSQL (postgres.js)
- Zod for config validation
The bot comes pre-seeded with 21 items commonly needed at student integrations (beer, vodka, sausages, bread, chips, etc.). Admins can add or remove items at any time using /admin add-item and /admin remove-item.