An automated Discord server setup bot that creates fully configured servers with roles, channels, categories, and modules based on predefined templates. Perfect for quickly deploying professional Discord servers for businesses, communities, gaming groups, and support teams.
- 4 Pre-built Templates:
- Business - Professional setup for companies and organizations
- Community - Engaging structure for social communities
- Gaming - Optimized for gaming groups and teams
- Support - Help desk and customer support focused
Automatically suggests and provides invite links for complementary bots based on your chosen template:
- Business: MEE6, Ticket Tool, Statbot, Hydra, Carl-bot
- Community: MEE6, Carl-bot, Statbot, Hydra, Giveaway Bot
- Gaming: MEE6, Rythm, Statbot, Ticket Tool, Carl-bot
- Support: Ticket Tool, Carl-bot, Statbot, MEE6, Logger
Enable additional features during setup:
- π« Ticket System - Support ticket management
- β Verification - Member verification system
- π Logging - Comprehensive event logging
- π Onboarding - Welcome messages and guides
- π Auto Role - Automatic role assignment
User-friendly step-by-step wizard with:
- Template selection
- Module configuration
- Confirmation and review
- One-click deployment
- Node.js 18+ installed
- Discord Bot Token (Get one here)
- Git (for cloning)
- Clone the repository
git clone https://github.com/abcodeworks-cod/discord-builder-server.git
cd discord-builder-server- Install dependencies
npm installNote for WSL Users: If you encounter esbuild platform errors, delete
node_modulesandpackage-lock.json, then runnpm installagain in WSL.
- Configure environment variables
Create a .env file in the root directory:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
GUILD_ID=your_test_server_id_hereHow to get these values:
- DISCORD_TOKEN: Discord Developer Portal β Your App β Bot β Token
- CLIENT_ID: Discord Developer Portal β Your App β General Information β Application ID
- GUILD_ID: Right-click your test server β Copy Server ID (enable Developer Mode in Discord settings)
- Invite the bot to your server
Generate an invite URL with required permissions:
- Go to Discord Developer Portal β Your App β OAuth2 β URL Generator
- Select scopes:
bot,applications.commands - Select bot permissions:
- Administrator (or specific permissions below)
- Manage Server
- Manage Roles
- Manage Channels
- Send Messages
- Embed Links
- Read Message History
- Manage Messages
- Start the bot
Development mode (with auto-reload):
npm run devProduction mode:
npm run build
npm start| Command | Description |
|---|---|
/setup |
Start the server setup wizard |
/help |
Display help information |
/template |
View available templates |
/bots |
Show recommended bots for your server |
/module |
Configure additional modules |
/reset |
Reset server configuration (admin only) |
- Run
/setupin your Discord server - Choose a template (Business, Community, Gaming, or Support)
- Select modules you want to enable
- Review and confirm your configuration
- Wait for setup completion (takes ~30-60 seconds)
The bot will automatically create:
- β Custom roles with colors and permissions
- β Organized channel categories
- β Text and voice channels
- β Permission overwrites
- β Welcome messages
- β Module configurations
[INFO] ServerBuilder Creating 6 roles in "Your Server"...
[INFO] ServerBuilder Created role: CEO
[INFO] ServerBuilder Created role: Management
[INFO] ServerBuilder Creating 6 categories...
[INFO] ServerBuilder Created category: π Information
[INFO] ServerBuilder Creating 15 channels...
[INFO] ServerBuilder Created text channel: welcome
[INFO] ServerBuilder Created voice channel: General Voice
[INFO] ServerBuilder Server setup complete!
discord-builder-server/
βββ src/
β βββ commands/ # Slash command handlers
β β βββ setup.ts # Main setup command
β β βββ help.ts # Help command
β β βββ bots.ts # Bot recommendations
β β βββ template.ts # Template info
β β βββ module.ts # Module configuration
β β βββ reset.ts # Reset command
β βββ events/ # Event handlers
β β βββ ready.ts # Bot ready event
β β βββ interactionCreate.ts # Command/button handler
β βββ services/ # Core business logic
β β βββ database.ts # Database service (SQLite)
β β βββ serverBuilder.ts # Server setup logic
β β βββ wizard.ts # Setup wizard flow
β β βββ botRecommendations.ts # Bot suggestions
β βββ templates/ # Server templates
β β βββ business.ts
β β βββ community.ts
β β βββ gaming.ts
β β βββ support.ts
β βββ index.ts # Entry point
βββ data/ # SQLite database (auto-created)
βββ .env # Environment variables
βββ .gitignore
βββ package.json
βββ tsconfig.json
βββ README.md
The bot uses SQLite for data persistence. The database is automatically created in the data/ folder on first run.
Tables:
servers- Server configurationsmodules- Enabled modules per serversettings- Bot settings
Each template defines:
- Roles: Name, color, permissions, position
- Categories: Name, position
- Channels: Name, type, topic, parent category, permissions
- Modules: Default enabled modules
You can customize templates by editing files in src/templates/.
Modules add extra functionality:
| Module | Description |
|---|---|
tickets |
Creates ticket system with categories and roles |
verification |
Adds verification channel and role |
logging |
Sets up logging channel for events |
onboarding |
Creates welcome/onboarding channels |
autorole |
Auto-assigns roles to new members |
# Development with auto-reload
npm run dev
# Build for production
npm run build
# Start production build
npm start
# Deploy slash commands
npm run deploy- Create a new file in
src/templates/(e.g.,education.ts) - Define roles, categories, channels, and modules
- Export the template configuration
- Add it to the template list in
src/services/wizard.ts
- Add module definition to
src/services/serverBuilder.ts - Implement module setup logic
- Add module to template configurations
- Update wizard UI in
src/services/wizard.ts
Issue: Unknown interaction errors
- Solution: Interactions expire after 3 seconds. The bot handles this gracefully with try-catch blocks. Check console for details.
Issue: esbuild platform error in WSL
- Solution: Delete
node_modulesandpackage-lock.json, then runnpm installin WSL.
Issue: Bot doesn't respond to commands
- Solution:
- Make sure you ran
npm run deployto register commands - Check bot has proper permissions in the server
- Verify
.envfile has correct values
- Make sure you ran
Issue: Channel creation fails
- Solution: Ensure bot has "Manage Channels" permission and is not rate-limited.
Issue: Role creation fails
- Solution:
- Check bot's role is higher than roles it's trying to create
- Verify "Manage Roles" permission
- Server may have reached role limit (250)
Enable verbose logging by setting environment variable:
DEBUG=true| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN |
β | Your Discord bot token |
CLIENT_ID |
β | Your Discord application ID |
GUILD_ID |
Test server ID (for dev command deployment) | |
DATABASE_PATH |
β | Custom database path (default: ./data/database.db) |
- Never commit
.envfile to version control - Keep your bot token secret
- Use
.gitignoreto exclude sensitive files - Regularly update dependencies:
npm update - Review bot permissions - use minimum required
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Discord.js - Powerful Discord API library
- better-sqlite3 - Fast SQLite3 library
- Discord community for inspiration and feedback
If you encounter issues or need help:
- Check the Troubleshooting section
- Open an issue on GitHub
- Join our Discord support server (link coming soon)
- Add more templates (Education, NFT/Crypto, Content Creators)
- Multi-language support
- Web dashboard for configuration
- Backup/restore functionality
- Template marketplace
- Custom template builder
Made with β€οΈ for the Discord community