A powerful, feature-rich Discord bot featuring music streaming, anonymous confessions, and community engagement tools
Quick Start β’ Features β’ Documentation β’ Contributing
- About
- Features
- Quick Start
- Commands
- Configuration
- Architecture
- Deployment
- Documentation
- Contributing
- License
NeruBot is a comprehensive Discord bot created by @nerufuyo that transforms your server into an interactive entertainment hub. Built with Go for superior performance and reliability, NeruBot follows Clean Architecture principles for maintainability and scalability.
- Lightning Fast - Built with Go for exceptional performance
- Premium Audio - Crystal-clear YouTube streaming via yt-dlp
- Privacy-First - Anonymous features with robust security
- Clean Architecture - Maintainable, scalable codebase
- Production Ready - Thread-safe operations and error handling
- Completely Free - No premium features, everything included
|
|
- Go 1.21+ - Download
- FFmpeg - For audio processing
- yt-dlp - For YouTube downloads
- Discord Bot Token - Create a bot
# Clone the repository
git clone https://github.com/nerufuyo/nerubot.git
cd nerubot
# Install dependencies
go mod download
# Copy environment template
cp .env.example .env
# Edit .env with your configuration
nano .env
# Edit .env with your configuration
nano .env
# Install system dependencies
# macOS
brew install ffmpeg
python -m pip install yt-dlp
# Ubuntu/Debian
sudo apt update
sudo apt install -y ffmpeg python3-pip
pip3 install yt-dlp
# Build and run
make build
make run# Build and run with Docker
docker-compose up -d
# View logs
docker-compose logs -f
# Stop bot
docker-compose down| Command | Description | Example |
|---|---|---|
/play <song> |
Play music from YouTube | /play never gonna give you up |
/skip |
Skip to next song | /skip |
/stop |
Stop playback and clear queue | /stop |
/pause |
Pause current playback | /pause |
/resume |
Resume playback | /resume |
/queue |
Display current queue | /queue |
/nowplaying |
Show current song info | /nowplaying |
| Command | Description | Example |
|---|---|---|
/confess |
Submit anonymous confession | Opens modal |
/confess-approve <id> |
Approve confession (Admin) | /confess-approve 5 |
/confess-reject <id> |
Reject confession (Admin) | /confess-reject 3 |
/confess-reply <id> |
Reply to confession (Admin) | Opens modal |
| Command | Description | Example |
|---|---|---|
/roast [@user] |
Generate personalized roast | /roast @username |
| Command | Description | Example |
|---|---|---|
/chat <message> |
Chat with Neru (AI assistant) | /chat what's your favorite music? |
/chat-reset |
Clear your chat history | /chat-reset |
| Command | Description | Example |
|---|---|---|
/news |
Get latest news headlines | /news |
/whale |
View recent whale transactions | /whale |
| Command | Description | Example |
|---|---|---|
/stats |
View server statistics | /stats |
/profile [@user] |
View user activity profile | /profile @username |
| Command | Description | Example |
|---|---|---|
/ping |
Check bot response time | /ping |
/help |
Display help information | /help |
/about |
Show bot information | /about |
Create a .env file in the project root:
# === REQUIRED SETTINGS ===
# Discord Bot Token (Get from: https://discord.com/developers/applications)
DISCORD_TOKEN=your_discord_bot_token_here
# === AI CHATBOT SETTINGS ===
# DeepSeek API Key (Get from: https://platform.deepseek.com/)
# Required for /chat commands with Neru AI personality
DEEPSEEK_API_KEY=your_deepseek_api_key_here
# === CRYPTO WHALE ALERTS ===
# Whale Alert API Key (Get from: https://whale-alert.io/)
# Required for /whale commands to track large crypto transactions
WHALE_ALERT_API_KEY=your_whale_alert_api_key
# === OPTIONAL MUSIC SETTINGS ===
# Spotify Integration (Optional - for better music search)
# Get from: https://developer.spotify.com/dashboard/applications
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
# === BOT CONFIGURATION ===
# Bot command prefix (default: !)
COMMAND_PREFIX=!
# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
LOG_LEVEL=INFO
# Enable/Disable Features
ENABLE_MUSIC=true
ENABLE_CONFESSION=true
ENABLE_ROAST=true
# === MUSIC SETTINGS ===
# Maximum songs in queue per server
MAX_QUEUE_SIZE=100
# Auto-disconnect timeout in seconds (0 = disabled)
AUTO_DISCONNECT_TIME=300
# === ADVANCED SETTINGS ===
# Bot activity status
BOT_STATUS=Your friendly Discord companion
# Database settings (if using database features)
DATABASE_URL=mongodb://localhost:27017
# Redis settings (if using caching)
REDIS_URL=redis://localhost:6379Features are automatically enabled/disabled based on API key availability:
- Music System - Controlled by
ENABLE_MUSICenvironment variable - AI Chatbot - Auto-enabled when
DEEPSEEK_API_KEYis configured - Confession System - Controlled by
ENABLE_CONFESSION(default: true) - Roast System - Controlled by
ENABLE_ROAST(default: true) - News Aggregation - Always available (uses free RSS feeds)
- Whale Alerts - Auto-enabled when
WHALE_ALERT_API_KEYis configured - Analytics - Always enabled (no API key required)
NeruBot follows Clean Architecture principles with clear separation of concerns:
nerubot/
βββ cmd/
β βββ nerubot/ # Application entry point
β βββ main.go
βββ internal/
β βββ config/ # Configuration management
β β βββ config.go # Main config structure
β β βββ constants.go # Constants and defaults
β β βββ messages.go # Response messages
β βββ entity/ # Domain models
β β βββ confession.go # Confession entities
β β βββ music.go # Music entities
β β βββ roast.go # Roast entities
β β βββ ...
β βββ repository/ # Data persistence layer
β β βββ confession_repository.go
β β βββ roast_repository.go
β β βββ repository.go
β βββ usecase/ # Business logic layer
β β βββ chatbot/ # AI chatbot service
β β βββ confession/ # Confession management
β β βββ music/ # Music streaming
β β βββ news/ # News aggregation
β β βββ roast/ # Roast generation
β β βββ whale/ # Whale alerts
β βββ delivery/ # External interfaces
β β βββ discord/ # Discord bot interface
β β βββ bot.go # Bot initialization
β β βββ handlers.go # Command handlers
β βββ pkg/ # Shared utilities
β βββ ai/ # AI provider implementations
β β βββ deepseek.go # DeepSeek integration
β βββ ffmpeg/ # FFmpeg wrapper
β βββ logger/ # Logging utilities
β βββ ytdlp/ # yt-dlp wrapper
βββ data/ # Data storage (JSON files)
β βββ confessions/ # Confession data
β βββ roasts/ # Roast data & patterns
βββ deploy/ # Deployment scripts
β βββ setup.sh # VPS setup script
β βββ systemd/ # Systemd service files
β βββ docker/ # Docker configurations
βββ docs/ # Documentation
βββ .env.example # Environment template
βββ docker-compose.yml # Docker Compose config
βββ Dockerfile # Docker build file
βββ Makefile # Build automation
βββ go.mod # Go dependencies
1. Entity Layer (internal/entity/)
- Pure business objects
- No external dependencies
- Defines core domain models
2. Use Case Layer (internal/usecase/)
- Business logic implementation
- Orchestrates data flow
- Independent of frameworks
3. Repository Layer (internal/repository/)
- Data persistence abstraction
- File/database operations
- Interface-based design
4. Delivery Layer (internal/delivery/)
- External interfaces (Discord, HTTP)
- Framework-specific code
- Converts external requests to use cases
5. Infrastructure (internal/pkg/)
- Shared utilities and tools
- External service wrappers
- Logging, AI providers, FFmpeg
- Dependency Inversion - High-level modules don't depend on low-level modules
- Single Responsibility - Each module has one reason to change
- Interface Segregation - Clients depend on interfaces they use
- Separation of Concerns - Clear boundaries between layers
- Testability - Easy to test each component independently
For detailed architecture documentation, see docs/ARCHITECTURE.md
# Run directly
go run cmd/nerubot/main.go
# Or use Makefile
make run# Build image
docker build -t nerubot:latest .
# Run container
docker run -d \
--name nerubot \
--env-file .env \
-v $(pwd)/data:/app/data \
nerubot:latest
# View logs
docker logs -f nerubot# One-command setup
curl -fsSL https://raw.githubusercontent.com/nerufuyo/nerubot/main/deploy/setup.sh | sudo bash
# Manual setup
sudo ./deploy/setup.sh
# Check status
sudo systemctl status nerubot
# View logs
sudo journalctl -u nerubot -f- Set
LOG_LEVEL=INFOorWARNING - Configure proper
BOT_STATUS - Enable only required features
- Set up monitoring and alerts
- Configure log rotation
- Regular backups of
data/directory - Use strong Discord bot token
- Restrict file permissions (chmod 600 .env)
For detailed deployment instructions, see docs/DEPLOYMENT.md
- Architecture Guide - System design and structure
- Deployment Guide - Production deployment instructions
- Project Structure - Detailed file organization
- Contributing Guide - How to contribute
- Changelog - Version history
- Discord.js Guide - Discord bot development
- Clean Architecture - Architecture principles
- Go Best Practices - Go programming guide
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
Follow the Conventional Commits specification:
<type>: <description>
[optional body]
[optional footer]
Types:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting)refactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
Examples:
feat: Add playlist support to music system
fix: Resolve queue management race condition
docs: Update installation instructions
For more details, see CONTRIBUTING.md
Completed Features:
- Music System (YouTube streaming with yt-dlp)
- Confession System (Anonymous submissions with moderation)
- Roast System (Activity tracking & personalized generation)
- AI Chatbot (Neru personality with DeepSeek)
- News Aggregation (RSS feeds from multiple sources)
- Crypto Whale Alerts (Real-time transaction monitoring)
- Analytics System (Server & user statistics)
- Slash Commands (Modern Discord interface)
- Clean Architecture Implementation
- Docker Support
Planned:
- Web Dashboard
- Database Migration (JSON β PostgreSQL)
- Microservices Architecture
- Advanced visualization
- Mobile app companion
- Music playback may have occasional buffering on slow connections
- Large confession images may take longer to process
- Roast cooldown is per-guild, not global
Report issues at: GitHub Issues
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 nerufuyo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- @bwmarrin - DiscordGo library
- yt-dlp - YouTube download tool
- FFmpeg - Audio processing
- Discord Community - Feedback and support
- Documentation: Check docs/ directory
- Discord Server: Join our community (Coming soon)
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Author: @nerufuyo
- Email: Create an issue for contact
- Website: Coming soon
Made by @nerufuyo
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can use, modify, and distribute this code freely, just keep the license notice.
Made with π by the NeruBot Team
β Star on GitHub β’ π Report Bug β’ π‘ Request Feature