Harmonica

A powerful Discord music bot with advanced features

Harmonica Bot Preview

Features

Multi-Platform Support

Play music from YouTube, Spotify, direct links, and livestreams with high-quality audio.

Multi-Server Support

Use Harmonica on multiple Discord servers simultaneously with separate queues.

SponsorBlock Integration

Automatically skip sponsor segments, intros, outros, and other non-music content.

Advanced Playback Control

Pause, skip, loop, shuffle, and manage your queue with simple commands.

Smart Caching

Intelligent local caching system for faster playback and reduced bandwidth usage.

Lyrics Integration

Get lyrics for the currently playing song with Genius integration.

Ready to enhance your Discord server?

Add Harmonica to your server today and enjoy high-quality music with your friends!

Add to Discord

Bot Commands

!play [URL/search]

Play audio from URL or search

!search [term]

Search YouTube for a song

!pause

Pause playback

!resume

Resume playback

!stop

Stop and clear queue

!skip

Skip current track

!replay

Replay current track

!random

Searches for a random song

!loop [count]

Toggle loop mode (optional count)

!nowplaying

Show current track info

!queue

Show queue

!clear

Clear entire queue

!clear [position]

Remove specific track

!shuffle

Shuffle queue

!join / !summon

Join your channel

!leave / !disconnect

Leave channel

!lyrics

Get lyrics for current song

!alias [add/remove/list]

Manage aliases

!ping

Show bot status

!version

Show bot version

!prefix

Change command prefix

!help

Show all commands

!logclear

Clear logs (Owner)

!restart

Restart bot (Owner)

!update

Update the bot to the latest version

!log

View the bot's logs

!clearcache

Clear the bot's cache

Selfhost Setup Guide

1

Install Python

Install Python 3.8 or higher and verify installation with python --version

2

Install Dependencies

Run pip install -r requirements.txt to install all required packages

3

Configure Bot Token

Rename .env.example to .env and add your Discord token

4

Launch Bot

Run python bot.py to start the bot

Optional Features

Spotify Integration

Rename .spotifyenv.example to .spotifyenv and add your Spotify API credentials

Genius Lyrics

Edit .geniuslyrics file (created on first startup) and add your Genius API credentials

Troubleshooting

FFmpeg Issues

Windows: Relaunch after first install

macOS/Linux: Automatic installation

YouTube Sign-In Error/403 Error

Check and update your cookies.txt file

Install Get Cookies.txt extension and export cookies to the bot's root directory