Production-grade prefix-based Discord music bot with Lavalink + Shoukaku, Supabase-backed settings, Spotify integration, premium systems, playlists/favorites, AFK/general utilities, and Components V2 UI.
- Node.js
>=20 - Discord.js v14
- Lavalink v4 via Shoukaku
- Spotify track/playlist resolve
- Supabase persistence (prefix, premium, playlists, favorites, AFK, etc.)
- Components V2 response layout
- Per-guild prefix + music channel lock
- No-prefix system (owner-managed)
- Vote premium + buy premium (token redeem)
- Music cards + controls + custom emojis
- 24/7 mode (premium)
- Cloud playlists + favorites
- AFK (server/global) with auto-clear + DM alert
src/
bot.js
index.js
commands/
components/
config/
database/
favorites/
filter/
general/
handlers/
lavalink/
music/
musiccard/
playlists/
premium/
services/
settings/
spotify/
utility/
utils/
voiceplay/
database/
README.md
supabase.sql
supabase_vote_premium.sql
docs/
screenshots/
website/
.env.example
package.json
Install dependencies:
npm installCopy the environment template:
cp .env.example .envWindows PowerShell:
Copy-Item .env.example .envThen configure your .env file with your Discord, Supabase, Lavalink, Spotify, and other required credentials.
DISCORD_TOKENSUPABASE_URLSUPABASE_KEYLAVALINK_HOSTLAVALINK_PORTLAVALINK_PASSWORDSPOTIFY_CLIENT_IDSPOTIFY_CLIENT_SECRETBOT_OWNER_IDNO_PREFIX_LOG_CHANNEL_ID
LAVALINK_SECURELAVALINK_IDENTIFIERLAVALINK_RECONNECT_TRIES(default999999)LAVALINK_RECONNECT_INTERVAL_MS(default5000)VOICE_CHANNEL_STATUS_ENABLEDTOPGG_TOKENGUILD_LOG_CHANNEL_ID(join/leave server log channel ID)VOTE_PREMIUM_HOURS(default12)PREMIUM_VOTE_LOG_CHANNEL_IDPREMIUM_BUY_URLTOPGG_VOTE_URLSPOTIFY_SEARCH_CONCURRENCYPLAY_SEARCH_CACHE_TTL_MSVOTE_EXPIRY_CHECK_MSVOTE_EXPIRY_BATCH_LIMIT
Premium Lavalink nodes are optional:
PREMIUM_LAVALINK_NODES_JSONPREMIUM_LAVALINK_SSL_*PREMIUM_LAVALINK_NONSSL_*
MUSIC_BTN_PAUSE_EMOJIMUSIC_BTN_RESUME_EMOJIMUSIC_BTN_SKIP_EMOJIMUSIC_BTN_LOOP_EMOJIMUSIC_BTN_STOP_EMOJIMUSIC_BTN_PLAYLIST_EMOJIMUSIC_BTN_PLAYLIST_ADD_EMOJIMUSIC_BTN_FAVORITE_EMOJIMUSIC_BTN_FAVORITE_ADD_EMOJI
The SQL files are stored in the database/ directory.
Run them in the following order using the Supabase SQL Editor:
database/supabase.sqldatabase/supabase_vote_premium.sql
Open:
database/supabase.sql
Copy its contents into the Supabase SQL Editor and execute it.
After the main database setup has completed, open:
database/supabase_vote_premium.sql
Copy its contents into a new Supabase SQL Editor query and execute it.
Always run
supabase.sqlbeforesupabase_vote_premium.sql.
For more detailed database setup instructions, see:
database/README.md
The SQL setup creates or updates the following database objects:
guildsno_prefix_usersuser_premium_profilesguild_vote_premiumpremium_tokensuser_spotify_profilesplaylistsplaylist_tracksplaylist_settingsuser_favoritesafk_globalafk_guildafk_nicknames
Before running SQL against an existing production database, review the queries and back up important data.
Production:
npm startDevelopment:
npm run devplaypauseresumeskipstopdisconnectqueuenowplayingvolumelooplyrics
filter- Filter presets
filter listfilter off
prefixmusicchannelconfig
helppingstatsuptimebotinfoserverstatsvoiceinfoshardinfosystemsupportinvite
spconnectspstatusspplaylistsspplayspdisconnect
playlist
Includes:
- create
- list
- add
- view
- load
- import
- export
- share
- autosync
- autoload
- and more
favorite
Includes:
- add
- list
- play
- play all
- remove
- queue add
votemypremiummyprefixmycard247premiumtokenpremiumredeem
afkavatar
noprefix
- User votes for the bot on Top.gg.
- The
votecommand synchronizes the user's premium state. - Default vote premium duration is 12 hours.
- Duration can be configured using
VOTE_PREMIUM_HOURS. - When premium expires, the bot can send a DM reminder containing a vote button.
- Re-voting and using
votereactivates the premium features.
- The bot owner generates a premium token using
premiumtoken. - A guild administrator redeems the token using
premiumredeem. - Guild premium features are activated according to the token's configured duration.
The musicchannel command allows a server to restrict music commands to a specific text channel.
musicchannel set #channel
musicchannel show
musicchannel clear
When enabled, music/playback-related commands can only be used in the configured channel.
The afk command opens an interactive AFK configuration.
Features include:
- Server AFK
- Global AFK
[AFK]nickname support- Automatic nickname restoration
- AFK reason
- AFK timestamp
- Avatar display
- Mention/reply detection
- DM notifications
- Automatic AFK removal when the user sends a message
The bot must have the required permissions to modify nicknames.
When a track starts playing, the bot can update the voice channel status with the current song.
Enable it using:
VOICE_CHANNEL_STATUS_ENABLED=trueThe status is cleared when:
- Playback stops
- The bot disconnects
- The queue ends
Spotify URL resolving uses the Spotify Web API with Lavalink search fallback.
Features include:
- Track resolving
- Playlist resolving
- Playlist imports
- Chunked playlist processing
- Search concurrency optimization
- Search result caching
Performance can be configured using:
SPOTIFY_SEARCH_CONCURRENCY=6
PLAY_SEARCH_CACHE_TTL_MS=120000Bot responses use Discord Components V2 layouts where supported.
Interactive panels can include:
- Buttons
- Select menus
- Pagination
- Media galleries
- Music cards
- Playback controls
- Custom emojis
Check the following:
- Enable the Message Content Intent in the Discord Developer Portal.
- Verify the configured prefix using
prefixorconfig. - If
musicchannelis enabled, make sure the command is being used in the configured channel. - Check the bot logs for command or database errors.
Check:
- Lavalink host
- Lavalink port
- Lavalink password
LAVALINK_SECURE- Lavalink node availability
- Network connectivity
- Lavalink v4 compatibility
Example:
LAVALINK_HOST=your-host
LAVALINK_PORT=2333
LAVALINK_PASSWORD=your-password
LAVALINK_SECURE=falseVerify:
SPOTIFY_CLIENT_IDSPOTIFY_CLIENT_SECRET
Make sure the Spotify application is active and its credentials have not been revoked.
Check:
SUPABASE_URLSUPABASE_KEY
If the database schema has changed, review and re-run the appropriate SQL file from:
database/
Check:
TOPGG_TOKENVOTE_PREMIUM_HOURS- Premium log channel configuration
- Vote status
- Supabase premium tables
After voting, run:
vote
Node.js 20 or newer is required.
For production:
- Keep
.envprivate. - Never commit real tokens, API keys, passwords, or client secrets.
- Use PM2, systemd, Docker, or another suitable process manager.
- Keep Lavalink reachable from the bot server.
- Use a production Supabase project with appropriate backups and security policies.
Example with PM2:
pm2 start src/index.js --name eleone
pm2 saveNever commit:
.env
or any file containing:
- Discord bot tokens
- Supabase service keys
- Lavalink passwords
- Spotify client secrets
- Top.gg tokens
- Other private credentials
Use .env.example as the safe template for required environment variables.
This project is licensed under the Eleone Custom Non-Commercial License.
- Non-commercial use only.
- No selling or resale.
- No commercial hosting or monetization.
- Required credit to the original Owner.
- No claiming the project as your own.
- Commercial use requires explicit written permission.
See the LICENSE file for the complete terms.

