- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps every dependency to its latest major, minor or patch version. ## Majors | Package | From | To | Notes | |---|---|---|---| | openai | 6.37.0 | 7.42.0 | Only type imports from `openai/resources/chat/completions` plus the client in `utils/openrouter.ts`; type-check passes | | dotenv | 17.4.2 | 18.0.8 | Not imported anywhere in `src` (Bun loads `.env` itself) | | execa | 9.6.1 | 10.2.0 | Not imported anywhere in `src` | | @types/node (dev) | 25.8.0 | 26.6.5 | | | oxlint-tsgolint (dev) | 0.25.0 | 7.0.2004 | Version scheme now follows tsgo 7; oxlint 1.89 needs `>=7.0.2003` | ## Minor/patch zod 4.6.7, livekit-server-sdk 2.19.2, oxlint 1.89.0, @types/bun 1.4.3, @faker-js/faker 10.6.0, @snazzah/davey 0.1.12, tsgo nightly, plus transitive updates. ## discord.js family - `discord.js` stays on the `dev` tag and moves to `15.0.0-dev.1792497873-5050a3b54`. - `@discordjs/builders` and `@discordjs/formatters` move from the old `pr-11006` build to the matching `dev` build (same `5050a3b54` commit). That is the formatters version discord.js@dev depends on itself. Their npm `latest` (1.x/0.x) would be a downgrade. ## Verification - `bun run ts`: the 3 `schema-extractor.ts` zod errors are gone, since zod now matches `../api` (4.6.7). The 4 remaining errors (`../api` crypto `BufferSource` ×3, `user.factory.ts` ×1) fail the same way before and after this bump, so this PR doesn't cause them. - `bun run lint`: passes (warnings only). - `bun test`: 1147 pass, 10 skip, 0 fail. Replaces Renovate PRs #281, #282, #287, #288, #292. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: sionzee <[email protected]> Reviewed-on: #294 |
||
| .forgejo/workflows | ||
| .github | ||
| .idea | ||
| data | ||
| deploy | ||
| sounds_ | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .gitmodules | ||
| bun.lock | ||
| CHANGELOG.md | ||
| CLAUDE.MD | ||
| Dockerfile | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| worktree.md | ||
🤖 Allcom Discord Bot
Production-ready Discord bot with modular architecture for comprehensive server management
Features • Quick Start • Commands • Development • Deployment
⚠️ Important Configuration Notice
This bot contains hardcoded Discord IDs for specific servers, channels, and roles in the configuration files (
src/util/config/). You will need to update these IDs to match your Discord server's structure before deployment.
✨ Features
🎮 Core Systems
- Virtual Voice Channels - Automatic temporary voice channel creation and management
- Rules Verification - Interactive quiz-based verification system for new members
- Warning System - Progressive moderation system with automatic role assignments based on standing
- Anti-bot Protection - Specialized rooms for bot detection and prevention
- Media Forum - Organized forum for memes, clips, and food posts with automatic tagging
- Stream Notifications - Automatic Twitch stream announcements
- News Embeds - Formatted news and changelog distribution system
- Achievement System - Track and reward user accomplishments
💰 Economy System
- Points System - Virtual currency for user engagement
- Daily Rewards - Claim daily points with streak bonuses
- Work System - Earn points through mini-games and activities
- Leaderboards - Track top users by points and activity
🛡️ Moderation Tools
- Violation Tracking - Record and manage user violations
- Standing System - Calculate user standing based on behavior
- Review System - Allow users to request moderation reviews
- Suspension Management - Temporary account restrictions
📋 Prerequisites
- Bun runtime (latest version)
- Discord Bot Token from Discord Developer Portal
- API Server running (see
apirepository)
🚀 Quick Start
-
Clone the repository
git clone https://github.com/evobug-com/bot.git cd bot -
Install dependencies
bun install -
Configure environment variables
cp .env.example .envEdit
.envand add your configuration:# Required DISCORD_TOKEN=your_discord_bot_token DISCORD_CLIENT_ID=your_discord_client_id # Optional (for development) DISCORD_GUILD_ID=your_test_guild_id NODE_ENV=development -
Update Discord IDs
Update the hardcoded IDs in these configuration files to match your server:
src/util/config/channels.ts- Channel IDs and namessrc/util/config/roles.ts- Role IDs and names
-
Start the API server
cd ../api bun run dev -
Run the bot
cd ../bots bun run dev
📁 Project Structure
bot/
├── src/
│ ├── bot.ts # Main bot entry point
│ ├── achievements/ # Achievement system modules
│ ├── client/ # ORPC client for API communication
│ ├── commands/ # Slash command implementations
│ ├── data/ # Static data (rules, violations)
│ ├── handlers/ # Event and feature handlers
│ ├── test/ # Test utilities
│ └── util/ # Utility functions and configs
│ └── config/ # Channel and role configurations
├── .env.example # Environment variables template
├── ecosystem.config.cjs # PM2 configuration
├── package.json
└── tsconfig.json
📝 Available Commands
Economy Commands
/daily- Claim daily points reward/work- Complete work activities for points/points [user]- Check point balance/top- View server leaderboard
Moderation Commands
/violation <action> <user>- Manage user violations/violations [user]- View violation history/standing [user]- Check user standing/review <type>- Request moderation review
Utility Commands
/send <message>- Send formatted messages/send-rules- Display server rules/news- Show latest news/changelog- Display bot changelog
🛠️ Development
Running Tests
bun test # Run all tests
bun test --watch # Run tests in watch mode
Type Checking
bunx tsgo --noEmit # Check TypeScript errors
Linting & Formatting
bunx oxlint --type-aware
Development Mode
bun run dev # Start with auto-reload
🔗 API Integration
The bot communicates with the API server using ORPC (Object RPC):
- API Endpoint:
http://127.0.0.1:3001 - Client Location:
src/client/client.ts - Contract Types: Shared between bot and API via TypeScript (located in API repo only)
Key API Features
- User registration and management
- Stats tracking and persistence
- Violation and suspension management
- Standing calculation
- Review system processing
⚙️ Configuration
Environment Variables
| Variable | Description | Required |
|---|---|---|
DISCORD_TOKEN |
Discord bot authentication token | ✅ |
DISCORD_CLIENT_ID |
Discord application client ID | ✅ |
DISCORD_GUILD_ID |
Guild ID for development (limits commands to one server) | ❌ |
NODE_ENV |
Environment mode (development or production) |
❌ |
🚢 Deployment
Using Bunctl
# Just start the bot, this will create bunctl.json if it doesn't exist
bunctl start src/bot.ts
Using PM2
# Start the bot
pm2 start ecosystem.config.cjs
# View logs
pm2 logs allcom-bot
# Stop the bot
pm2 stop allcom-bot
Direct Execution
bun run src/bot.ts
🐛 Troubleshooting
Common Issues
-
"Channel/Role not found" errors
- Update IDs in
src/util/config/files - Ensure bot has proper permissions
- Update IDs in
-
API connection failed
- Verify API server is running on port 3001
- Check
DATABASE_URLin API's.env
-
Commands not appearing
- Wait for command registration (can take up to 1 hour globally)
- Use
DISCORD_GUILD_IDfor instant updates in development
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Run tests and linting before committing
- Commit your changes (
git commit -m 'feat: Add amazing feature') - use conventional commits format - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Code Style
- Use TypeScript strict mode
- Follow Oxlint linting rules
- Maintain test coverage for new features
- Document complex logic with comments
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
💬 Support
For issues, questions, or contributions, please open an issue on GitHub or contact the development team.
Built with ❤️ using Discord.js, Bun, and ORPC