A modern, all-in-one Discord bot built with Node.js, discord.js v14+, and encrypted data storage. Features a professional web management panel with real-time monitoring and comprehensive moderation tools.
- Advanced Commands: ban, kick, mute, warn, purge, role management
- Automated Moderation: Bad word filtering, spam protection, content moderation
- Role Management: Staff-approved role requests with cooldown system
- Audit Logging: Complete action history with detailed logs
- Fun Commands: memes, jokes, 8ball, interactive games
- Server Tools: statistics, user lookup, leaderboards
- XP System: Automatic leveling with role-based bonuses
- Help System: Interactive paginated command help
- AES-256 Encryption: All data files encrypted at rest
- Secure Storage: Encrypted JSON database with automatic escrow
- Data Management: Automatic cleanup and size limits (8GB max)
- Audit Trails: Complete logging of all bot activities
- Modern UI: Glassmorphism design with smooth animations
- Real-time Monitoring: Live console logs and system statistics
- Data Visualization: Interactive charts and progress indicators
- Mobile Responsive: Works perfectly on all devices
- Secure Access: Encrypted data viewing with search functionality
- Node.js (latest LTS version)
- Discord Bot Token
- Discord Application ID
-
Clone the repository
git clone <repository-url> cd nyx-discord-bot
-
Install dependencies
npm install
-
Configure environment variables Create a
.envfile in the root directory:BOT_TOKEN=your-discord-bot-token CLIENT_ID=your-discord-application-id LOG_CHANNEL_ID=your-log-channel-id ENCRYPTION_KEY=your-64-character-hex-encryption-key
-
Generate encryption key (optional - for data security)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Add the output to your
.envfile asENCRYPTION_KEY -
Register slash commands
npm run reg
-
Start the bot
npm start
/
├── src/
│ ├── commands/ # Slash commands organized by category
│ │ ├── moderation/ # Ban, kick, warn, role management
│ │ ├── entertainment/ # Memes, jokes, games
│ │ └── utility/ # Help, stats, server info
│ ├── events/ # Discord.js event handlers
│ ├── config.js # Bot configuration
│ └── index.js # Main bot entry point
├── utils/
│ ├── jsondb.js # Encrypted database operations
│ ├── logger.js # Advanced logging system
│ └── rank.js # XP and leveling system
├── security/
│ ├── webpanel.js # Web panel server
│ ├── views/ # EJS templates for web interface
│ └── escrow_existing.js # Data encryption utilities
├── data/ # Encrypted data storage
│ ├── guilds/ # Server configurations
│ ├── profiles/ # User profiles and XP
│ └── logs/ # Audit logs and events
└── documentation/ # Comprehensive documentation
Access the professional web management panel at http://localhost:50249 when the bot is running.
- 📊 Real-time Statistics: Server count, user profiles, data usage
- 🔍 Advanced Search: Find any data file by name or ID
- 📁 File Browser: Navigate encrypted data with modern interface
- 🎨 Modern Design: Glassmorphism UI with smooth animations
- Dashboard (
/) - Main overview and file browser - Statistics (
/statistics) - Detailed analytics and metrics - Console (
/console) - Live bot logs with syntax highlighting - Settings (
/blank) - Configuration and system management
- 🔒 Secure Data Viewing: Decrypt and view encrypted files
- 📱 Mobile Responsive: Perfect on all screen sizes
- 🎯 Interactive Elements: Hover effects and smooth transitions
- 📊 Data Visualization: Charts, progress bars, and indicators
Use /szerverbeallitas to configure your server:
// Available settings
logChannel: "Channel for bot logs"
rolesChannel: "Channel for role approval requests"
deleteroleChannel: "Channel for role deletion requests"
staffRoles: ["Array of staff role IDs"]
requestRoles: ["Array of roles that can request roles"]
roleCooldown: "Cooldown role ID for role restrictions"/ban- Ban a user from the server/kick- Kick a user from the server/warn- Issue a warning to a user/purge- Bulk delete messages/rangadas- Request role assignment (staff approval)/rangtorles- Request role removal (staff approval)
/sugo- Interactive help system/serverinfo- Detailed server statistics/rang- Check your XP and level/ranglista- Server leaderboard
/meme- Random meme from API/vicc- Random joke/8ball- Magic 8-ball responses
While the bot is running, use these console commands:
restart # Restart the bot
stop # Stop the bot
say <message> # Send message to log channel
broadcast <type> # Broadcast to all servers
guilds # List all connected servers
users <guildId> # List users in a server
eval <code> # Execute JavaScript (dangerous!)
db <operation> # Database operations
help # Show all console commandsdb list <type> # List files (profiles, guilds, logs)
db get <type> <guildId> <userId> # Get user data
db set <type> <guildId> <userId> <json> # Set user data
db delete <type> <guildId> <userId> # Delete user data
db raw <type> <guildId> <userId> # View raw file content- XP System: Automatic XP gain from messages with role bonuses
- Spam Protection: Configurable message limits and timeouts
- Bad Word Filter: Automatic content moderation with muting
- Data Encryption: All files automatically encrypted with AES-256
- Log Rotation: Automatic cleanup when storage limit reached
npm start # Start the bot
npm run dev # Start with debug logging
npm run reg # Register slash commands
npm test # Run testsBOT_TOKEN= # Discord bot token (required)
CLIENT_ID= # Discord application ID (required)
LOG_CHANNEL_ID= # Default log channel (optional)
ENCRYPTION_KEY= # 64-char hex key for encryption (optional)
AUTO_REGISTER_COMMANDS=true # Auto-register commands on start- Create a new file in the appropriate
/src/commands/subfolder - Follow the existing command structure with
dataandexecuteexports - Restart the bot or run
npm run regto register new commands
Add new event handlers in /src/events/ following the Discord.js v14 event structure.
- Command usage statistics
- User activity tracking
- Server growth analytics
- Error rate monitoring
- Performance metrics
- INFO: General bot operations
- WARN: Non-critical issues
- ERROR: Critical errors requiring attention
- EVENT: User actions and Discord events
- DEBUG: Detailed debugging information
- All user data encrypted with AES-256-CBC
- Automatic key generation and management
- Secure file storage with access controls
- No sensitive data in logs or console output
- Regular automated backups
- Encrypted data transmission
- Secure token management
- Audit trail for all actions
Comprehensive documentation available in the /documentation/ folder:
- Overview - General bot information
- Commands - Detailed command reference
- Configuration - Setup and customization
- Moderation - Moderation system guide
- Rank System - XP and leveling mechanics
- Console Commands - Developer tools
- Error Handling - Troubleshooting guide
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
For support, documentation, or feature requests:
- Check the
/documentation/folder - Use the web panel console for debugging
- Review bot logs for error information
- Ensure all environment variables are properly configured
Built with ❤️ using Node.js, Discord.js v14, and modern web technologies