Bass is a feature-rich discord music bot.
With features like the button-controlled player message, easy interop with spotify links,
built-in lyrics search and many more features, it offers the best listening experience.
- Multi-source playback — YouTube, Spotify, SoundCloud, and more via Lavalink
- Load Playlists — Support for YouTube and Spotify playlists and albums
- Interactive player message — Button controls for play/pause, skip, previous, stop, and loop
- Queue management — View, shuffle, move, remove tracks, and save/load queues across sessions
- Search — Search for tracks directly from Discord with
/search - Loop modes — Loop the current track or the entire queue
- History — Restore your previous queue with
/historyand/loadqueue - Web dashboard — Monitor active players, guilds, and activity from a browser
- Lyrics — Look up lyrics for the current song with
/lyrics - Channel binding — Restrict bot commands to specific channels with
/bindchannel
| Command | Description |
|---|---|
/play |
Play a song by URL or search query |
/search |
Search and pick from results |
/queue |
View the current queue |
/shuffle |
Shuffle the queue |
/lyrics |
Show lyrics for the current track |
/loop |
Toggle loop (track / queue / off) |
/history |
View previous queues |
/loadqueue |
Restore a saved queue |
/seek |
Jump to a position in the track |
/volume |
Adjust playback volume |
/w2g |
Create a Watch2Gether room |
The easiest way to run BassBot is with Docker Compose.
mkdir bassbot-data && cd bassbot-data# Bot config
curl -o config.json https://raw.githubusercontent.com/tomfln/bassbot/main/config/config.example.json
# Lavalink config, can be placed anywhere
curl -o application.yml https://raw.githubusercontent.com/tomfln/bassbot/main/config/application.ymlOpen bassbot-data/config.json and fill in your values:
{
"token": "your_bot_token_here",
"clientId": "your_client_id_here",
"w2gKey": "your_w2g_api_key_here",
"nodes": [
{
"name": "node1",
"url": "lavalink:2333",
"auth": "youshallnotpass"
}
]
}| Key | Description |
|---|---|
token |
Your Discord bot token (Discord Developer Portal) |
clientId |
Your Discord application's client ID |
w2gKey |
Your Watch2Gether API key |
apiPort |
Dashboard API port (default: 3001) |
dashboardEnabled |
Enable the web dashboard (default: true) |
nodes |
Lavalink nodes — defaults work with the compose file |
To enable Spotify link support, edit application.yml, enable the spotify source and set your Spotify API credentials under plugins.lavasrc.spotify:
lavasrc:
# ...
sources:
spotify: true
# ...
spotify:
clientId: "your_spotify_client_id"
clientSecret: "your_spotify_client_secret"You can create these at the Spotify Developer Dashboard.
docker compose up -dThe bot will start, connect to Lavalink, and be ready to use. Invite it to your server, join a voice channel, and run /play.
Tip: All config values can also be overridden via environment variables in the compose file (e.g.,
TOKEN,CLIENT_ID). Env vars take priority overconfig.json.
YouTube requires OAuth authentication for reliable playback. Without it, you may encounter errors or age-restricted content blocks.
Warning: Use a burner Google account, not your main one. OAuth tokens give access to the account's YouTube data.
-
In
lavalink/application.yml, make sure OAuth is enabled without a refresh token:plugins: youtube: oauth: enabled: true
-
Start the stack:
docker compose up -d
-
Watch the Lavalink logs:
docker logs -f lavalink
-
Lavalink will print a message like:
To give youtube-source access to your account, go to https://www.google.com/device and enter code XXXX-XXXX -
Open the URL in your browser, sign in with a burner Google account, and enter the code.
-
Once authorized, Lavalink logs will show:
Token retrieved successfully. Store your refresh token as this can be reused. (1//0xxxx...) -
Copy the refresh token and add it to
lavalink/application.yml:plugins: youtube: oauth: enabled: true refreshToken: "1//0xxxx..." skipInitialization: true
-
Restart Lavalink to apply:
docker compose restart lavalink
From now on, Lavalink will use the refresh token automatically — no manual login needed.
- Clone the repository
- Run
bun install - Create a
data/directory with aconfig.json(seeconfig.example.json) - Run
bun devto start the bot + dashboard in dev mode
- TypeScript — Fully typed codebase with custom type-safe command framework
- Bun — Fast JS runtime, no build step needed
- Lavalink + Shoukaku — Reliable audio playback with Spotify support
- Discord.js — Discord API interaction
- Drizzle ORM + SQLite — Lightweight embedded database for persistence
- React + Vite — Dashboard for monitoring the bot
This project is licensed under the MIT license. See the LICENSE file for more information.
Contributions are welcome! Please open an issue or a pull request.