Synapse V5 is a modular, extensible, and highly customizable Discord bot and dashboard system designed for advanced users and developers who want full control over bot commands, event handling, dashboard management, and data persistence.
- Features
- Installation
- Directory Structure
- Creating Commands
- Creating Events
- Creating Components
- Dashboard
- Database
- Development Tools
- Backup & Restore
- Troubleshooting
- Contributing
- Hot-reloadable commands with automatic state tracking
- Command aliases support
- Granular permission controls
- Cooldown management
- Guild-only and owner-only restrictions
- Command categories
- Real-time command management
- Live command enabling/disabling
- Command settings modification
- Search and filtering
- Command statistics
- Custom event listeners
- Interaction handling (Buttons, Menus, Modals)
- Error tracking and reporting
- SQLite with prepared statements
- Permission validation
- Settings management
- Hot Module Reloading
- Template generation for rapid development
- Detailed logging system
- Environment validation
- Node.js v18+
- npm (comes with Node.js)
- Discord Bot Token
Important: Before anything, run
npm initin the console and spam through the prompts.
-
Start the setup process:
node . -
Follow the prompts:
- Enter prefix: Common prefix is
! - Enter dashboardPort: Typical port is
3000 - Enter bot token: Your Discord bot token
- Enter package manager: Common is
npm
- Enter prefix: Common prefix is
-
Access your dashboard: After setup, Ctrl+LeftClick the
https://localhost:yourportlink
synapse-v5/
├── config.json
├── index.js
├── package.json
├── backups/
├── commands/ # Bot commands by category
├── components/ # UI components (buttons, menus, modals)
├── dashboard/ # Web dashboard server and assets
├── events/ # Discord event listeners
├── prefix/ # Command prefix configuration
└── utils/ # Core utilities and helpers
Commands are automatically generated using the TemplateGen utility. Place command files in the commands/ directory organized by category.
module.exports = {
data: new SlashCommandBuilder()
.setName('command')
.setDescription('Command description'),
category: 'Category',
cooldown: 5, // seconds
guildOnly: true, // server only command
devOnly: false, // developer only command
permission: 'MANAGE_MESSAGES', // required permission, supports both V13 and V14 syntax
alias: ['cmd', 'cm'], // command aliases
execute: async (interaction) => {
// Command logic
}
};- Hot Reloading: Modify and reload without restarting
- State Tracking: Changes tracked using CRC32 hashing
- Aliases: Multiple names for the same command
- Restrictions: Guild-only, owner-only, permission-based access
- Cooldowns: Per-command and global management
- Categories: Organize by function/purpose
Events are automatically generated using the TemplateGen utility. The template generator will create the basic structure for you.
const db = require('../../dashboard/server/database/DB');
const { ChannelType } = require('discord.js');
module.exports = {
event: "eventName",
once: false,
async execute(message, client) {
}
};The TemplateGen utility automatically generates event templates:
module.exports = {
name: '${name}',
once: false,
async execute(client, ...args) {
client.logs.event(`${name} event fired`);
}
};- event/name: The Discord.js event name
- once: Whether the event should only fire once
- execute: The function that runs when the event is triggered
Components handle UI interactions like buttons, select menus, and modals. The TemplateGen utility automatically generates component templates.
module.exports = {
customId: 'componentid',
async execute(interaction, client) {
await interaction.reply('Component activated!');
}
};- Buttons: Interactive buttons in messages
- Select Menus: Dropdown selection menus
- Modals: Pop-up forms for user input
The TemplateGen utility creates these components automatically with proper structure and error handling.
The dashboard provides a comprehensive web interface for bot management.
Command Management:
- Real-time command toggling
- Settings modification
- Command reloading
- Category filtering
- Search functionality
- Statistics tracking
Interface:
- Modern, responsive design
- Dark theme
- Interactive modals
- Toast notifications
- Loading indicators
API Endpoints:
/api/commands/:name/settings- Update command settings/api/commands/:path/reload- Reload specific commands/api/commands/refresh- Refresh all commands/api/shutdown- Graceful shutdown
- SQLite database at
dashboard/server/database/dashboard.db - Schema in
dashboard/server/database/dashboard.sql - Access via
DB.jsutility - Prepared statements for security and performance
The TemplateGen utility (utils/TemplateGen.js) automatically generates:
- Command templates with proper structure
- Event listeners with error handling
- Component handlers with interaction logic
- Database schemas and utilities
- HotReloader for live updates without restarts
- Command hash tracking for change detection
- State persistence across reloads
- Detailed logging with multiple levels
- Error tracking with unique IDs
- Color-coded console output
- File logging for persistence
Backups include:
- Configuration files
- Database
- Custom commands and events
- Dashboard settings
Bot not starting:
- Verify bot token in
config.json - Check Node.js version (v18+ required)
Dashboard not loading:
- Ensure port is available
- Check firewall settings
- Verify dependencies installed
Database errors:
- Check SQLite file permissions
- Verify schema integrity
- Ensure database directory exists
- Console logs with detailed error information
- Environment checks via
EnvironmentCheck.js - Package validation via
PackageChecker.js - Intent verification via
IntentChecker.js
-- Developed by Ghost!