A feature-rich Discord music bot with AI conversation capabilities, voice recognition, and text-to-speech functionality.
/play <song>- Play music from YouTube, Spotify, SoundCloud, or direct URLs/pause- Pause the current track/resume- Resume paused music/stop- Stop playback and clear queue/skip- Skip to next track/back- Go to previous track/queue- Display current music queue/nowplaying- Show currently playing track info/volume <1-100>- Adjust playback volume/shuffle- Shuffle the queue/loop- Toggle loop modes (track, queue, off)/clear- Clear the music queue/remove <position>- Remove specific track from queue/jump <position>- Jump to specific track in queue/skipto <track>- Skip to specific track by name/seek <time>- Seek to specific time in track/filter <filter>- Apply audio filters (bassboost, nightcore, etc.)/lyrics- Display song lyrics/syncedlyrics- Create synchronized lyrics thread/save- Save current track to favorites/history- Show recently played tracks/search <query>- Search for tracks/playnext <song>- Add song to play next
- YouTube (videos, playlists, shorts)
- High-quality audio with configurable bitrate
- Queue management with position tracking
- Audio filters for enhanced listening experience
- Lyrics synchronization in Discord threads
- Track history and favorites system
- Volume control with memory
- Auto-disconnect when channel is empty
- DJ role system for restricted commands
- Speech-to-text recognition in voice channels
- Text-to-speech responses using Google TTS (wanna change it to some local solution)
- Voice commands for music and AI interactions
- Welcome messages when users join voice channels
- Local AI processing using Ollama
- Conversation memory per server
- Weather queries via voice commands
- Custom voice triggers and responses
- "jardo [question]" - Ask AI anything
- "jaké je počasí v [city]" - Get weather information, default is Prague
- "nazdar kamarádi" - Greeting response
- "dobrou noc" - Good night message
- "jardo stop" - Stop AI responses
- Node.js (v16 or higher)
- FFmpeg installed on your system
- Python (for some dependencies)
- Discord Bot Token
- Ollama (for AI features)
Create a .env file in the root directory:
TOKEN=your_discord_bot_token_herenpm installTo enable AI conversation features:
- Install Ollama from ollama.ai
- Download the Gemma model:
ollama pull gemma3:12b
- Start Ollama service:
ollama serve
# Using chocolatey
choco install ffmpeg
# Or download from https://ffmpeg.org/download.html# Using homebrew
brew install ffmpegsudo apt update
sudo apt install ffmpegnode main.jsnpm start# Build the Docker image
docker build -t patrickthedj .
# Run the container
docker run patrickthedj- Language settings (Default: Czech, but you can set any)
- Volume defaults and limits
- Auto-disconnect settings
- DJ role configuration
- Emoji customization
Configure custom display names for users:
{
"users": {
"username": {
"nominative": "Eliška",
"vocative": "Eliško"
}
}
}/play despacito
/play https://www.youtube.com/watch?v=dQw4w9WgXcQ
/volume 80
/loop queue
- Join a voice channel and say: "jardo what's the weather like?"
- Say: "jardo tell me a joke"
- Ask: "jak počasí v Praze?"
-
Bot can't join voice channel
- Check bot permissions
- Ensure bot has "Connect" and "Speak" permissions
-
Music not playing
- Verify FFmpeg is installed
- Check internet connection
- Ensure YouTube/SoundCloud are accessible
-
AI not responding
- Verify Ollama is running (
ollama serve) - Check if Gemma model is downloaded
- Ensure port 11434 is accessible
- Verify Ollama is running (
-
Voice recognition not working
- Check bot has "Use Voice Activity" permission
- Ensure microphone permissions are granted
Enable debug mode in config.js:
debug: true