Shard-ready Discord music bot powered by Rainlink, Lavalink, and Discord.js v14.
[![Version][version-shield]](version-url) [![MIT License][license-shield]][license-url] [![Contributors][contributors-shield]][contributors-url] [![Stargazers][stars-shield]][stars-url] [![Forks][forks-shield]][forks-url] [![Watchers][watchers-shield]][watchers-url] [![Issues][issues-shield]][issues-url] [![Node Version][node-shield]](#-requirements) [![Discord.js][discordjs-shield]](https://discord.js.org/#/docs/discord.js/main/general/welcome) [![Rainlink][rainlink-shield]](https://www.npmjs.com/package/rainlink)
π§ Table of Contentsβ‘ Quick Startgit clone https://github.com/adh319/Lunox.git
cd Lunox
npm install
cp .env.example .env
Windows PowerShell:
Copy-Item .env.example .env
.env (TOKEN, MONGO_URI, Lavalink connection values, etc).src/settings/config.js.npm start
π’ Main Featuresdiscord-hybrid-sharding architecture (auto shard/cluster mode)v3 / v4) and voice plugin enabled/247) with reconnect persistence per guild/autoplay) with YouTube-only fallback behavior/lyric)π RequirementsποΈ Command Overview| Group | Commands |
|---|---|
| General | /help, /ping |
| Music | /play, /queue, /skip, /previous, /pause, /resume, /stop, /seek, /remove, /clear, /shuffle, /loop, /filter, /volume, /join, /leave, /lyric |
| Settings | /247, /autoplay |
ban, unban, maintenance, lavalink, eval, restartsrc/commands/message/devdev array in src/settings/config.js)π§ Environment VariablesCreate a .env file from .env.example.
| Key | Default | Purpose |
|---|---|---|
TOKEN |
- | Discord bot token |
PREFIX |
! |
Prefix for dev message commands |
EMBED_COLOR |
5865F2 |
Embed hex color (without #) |
LEAVE_TIMEOUT |
60000 |
Inactivity timeout before leaving VC (ms) |
DEFAULT_VOLUME |
100 |
Initial player volume |
MIN_VOLUME |
1 |
Minimum volume |
MAX_VOLUME |
100 |
Maximum volume |
MONGO_URI |
- | MongoDB connection string |
SUPPORT_SERVER_URL |
- | Support button URL |
DEBUG |
false |
Enable debug logs when true |
| Key | Default | Purpose |
|---|---|---|
LAVALINK_NAME |
Lunox |
Node name |
LAVALINK_HOST |
localhost |
Lavalink host |
LAVALINK_PORT |
2333 |
Lavalink port |
LAVALINK_PASSWORD |
youshallnotpass |
Lavalink password |
LAVALINK_SECURE |
false |
Use secure connection (true / false) |
LAVALINK_DRIVER |
lavalink/v4/koinu |
Rainlink driver for your Lavalink version |
| Key | Default | Purpose |
|---|---|---|
LAVALINK_SOURCE |
sp |
Source ID used for /play search |
DEFAULT_SEARCH_ENGINE |
youtubeMusic |
Primary search engine |
SEARCH_FALLBACK_ENGINE |
youtube |
Fallback search engine |
Notes:
- Spotify/Apple/Deezer/Others source support depends on your Lavalink plugins and Lavalink server configuration.
βοΈ Configuration NotesEdit src/settings/config.js:
dev: ["123456789012345678"],
These IDs can access developer-only flows and bypass maintenance lock.
Customize player and pagination emojis in src/settings/emoji.js.
LAVALINK_SOURCE should match source IDs enabled in Lavalink.
Examples:
yt -> YouTube search (ytsearch)ytm -> YouTube Music search (ytmsearch)sc -> SoundCloud search (scsearch)sp -> Spotify search (spsearch) when plugin/source is enabledam -> Apple Music search (amsearch) when plugin/source is enableddz -> Deezer search (dzsearch) when plugin/source is enabledUse only IDs supported by your Lavalink server/plugins.
LavaSrc reference (supported URLs & queries): https://github.com/topi314/LavaSrc?tab=readme-ov-file#supported-urls-and-queries
π Installation (Local)git clone https://github.com/adh319/Lunox.git
cd Lunox
npm install
cp .env.example .env
Windows PowerShell:
Copy-Item .env.example .env
.envsrc/settings/config.jsnpm start
π³ Installation (Docker)This repository includes:
Dockerfile for the bot imagedocker-compose.yml for bot + MongoDBLAVALINK_HOST to your Lavalink host (host.docker.internal is used as compose default).docker compose up -d --build
docker compose down
π Permissions NeededAt minimum, ensure the bot can:
ViewChannelSendMessagesEmbedLinksReadMessageHistoryConnectSpeakFor stage channels, also allow:
RequestToSpeakPrioritySpeakerπ§ͺ TroubleshootingTOKEN and intents in Discord Developer PortalLEAVE_TIMEOUT or enable /247MONGO_URI connectivityDEBUG=trueIf you find Lunox useful, consider supporting continued development:
π€ Bots Using This Source CodeIf youβre using this source code and want your bot listed below, submit a pull request by editing the table with your details:
| No. | Bot Name | Invite Link | Support Server |
|---|---|---|---|
1 |
Jive | Invite Link | Jive Corner |
2 |
Xyvo | Invite Link | Xyvo |
3 |
Β | Β | Β |
4 |
Β | Β | Β |
π€ ContributingContributions are welcome.
π₯ Contributorsπ LicenseThis project is licensed under the MIT License.
You are free to use and modify the code, but include attribution to the original repository:
Β© 2024 adh319@github. This project is available under the MIT License.
You must include proper attribution by linking to: https://github.com/adh319/Lunox
Made by adh319
Lunox Discord Music Bot β’ Built for Excellence