A feature-rich, customizable Discord music bot built with Node.js and discord.js. Supports YouTube, Spotify, and more, with advanced queue and playback controls, admin features, and easy configuration. Uses Lavalink with advanced plugins for high-quality audio streaming.
- 🎵 Music Playback: Play, pause, resume, skip, stop, seek, replay, previous, clear queue, and volume control
- 🔁 Loop & Filters: Loop tracks/queue, apply audio filters
- 📃 Queue Management: View, manage, and clear the music queue
- ℹ️ Information: Now playing, help, ping, uptime
- ⚙️ Settings: Change bot prefix, reset prefix
- 👑 Admin: Manage custom playlists (add, list, remove)
- 🎧 Spotify Integration: Play tracks from Spotify (requires credentials)
- 🗄️ SQLite Database: Persistent storage for settings and sessions
- 🛠️ Custom Emoji: Rich emoji feedback for all actions
- 🔊 Advanced Lavalink Support: High-quality audio streaming with LavaSrc and YouTube plugins
- 🎼 Lyrics Support: Automatic lyrics fetching from Spotify and YouTube
- 🔍 Multi-Source Search: Fallback search across multiple platforms
This bot requires two essential Lavalink plugins for full functionality:
- Dependency:
com.github.topi314.lavasrc:lavasrc-plugin:4.7.2
- Purpose: Enhanced Spotify integration with lyrics support
- Features: Better track resolution, lyrics fetching, multi-source search
- Dependency:
dev.lavalink.youtube:youtube-plugin:1.13.3
- Purpose: Better YouTube support with multiple client types
- Features: Enhanced search, direct video/playlist support, better compatibility
Both plugins are automatically downloaded when you run Lavalink with the provided configuration.
- Node.js v16+
- A Discord bot token (guide)
- Lavalink Server (see setup below)
You can use a local Lavalink server. Add these to your .env
file:
LAVALINK_HOST=localhost
LAVALINK_PORT=2333
LAVALINK_PASSWORD=your_password_here
LAVALINK_SECURE=false
-
Download Lavalink:
wget https://github.com/lavalink-devs/Lavalink/releases/download/4.0.0/Lavalink.jar
-
Create application.yml: See
LAVALINK_SETUP.md
for the complete advanced configuration with plugins. -
Run Lavalink:
java -jar Lavalink.jar
-
Clone the repository:
git clone https://github.com/atifahmed9461/Lavasic.git cd Lavasic
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory with the following:TOKEN=your_discord_bot_token PREFIX=! SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret # Lavalink Configuration LAVALINK_HOST=localhost LAVALINK_PORT=2333 LAVALINK_PASSWORD=your_password_here LAVALINK_SECURE=false
(Spotify credentials are optional but recommended for full functionality)
-
Configure the bot: Edit
settings/config.js
to customize bot settings, status, owner ID, and more.
- Production:
npm start
- Development (with auto-reload):
npm run dev
- Music: play, stop, pause, resume, skip, queue, loop, filters, nowplaying, seek, replay, previous, clearqueue, volume
- Information: help, ping, uptime
- Admin: npadd, nplist, npremove
- Settings: setprefix, resetprefix
Lavasic/
commands/
message/
Admin/ # Playlist management
Information/ # Bot info commands
Music/ # Music playback & queue
Settings/ # Prefix and config
database/ # SQLite DB files
events/ # Event handlers
fonts/ # Font files
settings/ # Config, emoji, node
utils/ # Utility modules
index.js # Main entry point
- Better Audio Quality: Higher bitrate and better codec support
- Reduced CPU Usage: Audio processing handled by Lavalink server
- More Sources: Support for YouTube, Spotify, SoundCloud, Bandcamp, Twitch, Vimeo, Nico
- Advanced Features: Audio filters, equalizer, lyrics support, and more
- Plugin Support: LavaSrc for enhanced Spotify integration, YouTube plugin for better search
- Scalability: Can handle multiple bots and servers
- Multi-Source Search: Intelligent fallback across different platforms
- LavaSrc Plugin: Enhanced Spotify integration with lyrics and better search
- YouTube Plugin: Improved YouTube support with multiple client types
- Lyrics Support: Automatic lyrics fetching from Spotify and YouTube
- High-Quality Audio: Optimized Opus encoding and buffer settings
- Comprehensive Logging: File-based logging with rotation
- Lavalink Connection Issues: Check if your Lavalink server is running and credentials are correct
- Plugin Loading Issues: Ensure Java 17+ and internet connection for plugin downloads
- Audio Quality: Ensure you're using a good Lavalink server with proper bandwidth
- Spotify Issues: Verify your Spotify API credentials in the
.env
file - Memory Issues: Allocate at least 2GB RAM for Lavalink with plugins
Join our Discord for help and community support: https://discord.gg/tsbBKz2k53
Created by Atif Ahmed 🖤
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Made with ❤️ for Discord communities.