A Discord.js v14 bot for the Tucsonians Discord server. It provides event management, a points/gamification system, emoji management, and utility commands.
- Event Management — Create, list, update, and delete server events with rich embeds, optional end times, and location support
- Points System — Users earn 1 point per minute in voice channels (daily cap: 100). Includes leaderboard and point checking
- Emoji Management — Submit custom emojis with admin approval workflow, slot tracking, and a link to an emoji resizer tool
- Pluggable Storage — Abstract storage interface with a default JSON file backend and a database template for easy extension
- Utility Commands — Dice rolling, server info, user info, and more
| Command | Description |
|---|---|
/create-event |
Create a new event with title, start time, and optional details |
/events |
List upcoming events (default: next 14 days) |
/update-event |
Update an existing event (creator only) |
/delete-event |
Delete an event (creator only) |
/emoji |
Submit an image to create a custom emoji (admin approved) |
/emoji_site |
Link to emoji resizer tool |
/slots |
Check available emoji slots |
/points check |
Check your or another user's cactus points |
/points leaderboard |
View the top 10 users by total points |
/roll |
Roll a die with n sides |
/ping |
Pong! |
/server |
Display server name and member count |
/user |
Display username and join date |
/eric |
We love you, Eric! |
- Node.js (v16 or higher)
- npm
- Create a Discord bot with appropriate permissions
- Invite the bot to your Discord server
- Copy
config/config_sample.jsontoconfig/config.jsonand fill in your bot details:token: Your Discord bot tokenclientId: Your Discord application client IDguildId: Your Discord server ID
- Install dependencies:
npm install - Deploy slash commands:
node deploy-commands.js - Start the bot:
node index.js
npm test # Run tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportcommands/
calendar/ — Event management commands
emoji/ — Emoji submission and slot tracking
utility/ — General-purpose commands
events/ — Discord.js event handlers (ready, interactionCreate, voiceStateUpdate)
utilities/ — Business logic (event manager, points, storage)
data/ — Runtime JSON data files (gitignored)
config/ — Bot credentials (gitignored)
tests/ — Jest test suite
Commands and event handlers are dynamically loaded from their directories at startup. The storage layer uses an abstract interface (StorageInterface) backed by a JSON file implementation (FileStorage), with a database template available for extension.
