Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Logo

๐ŸŽต PrimeMusic - Advanced Lavalink Music Bot - 1.5.1

Version License Node Discord.js

A feature-rich, high-performance Discord music bot built with Lavalink and Discord.js v2 Components


๐Ÿ”— Connect With Me

YouTube Website Replit Discord


Features โ€ข Installation โ€ข Configuration โ€ข Usage โ€ข Support


  • ๐Ÿ’— Credits to UnquizableDev for developing the song recommendation system and fully refactoring the playlist menu UI/UX.

โœจ Features

๐ŸŽถ Music Features

  • Multi-Platform Support: YouTube, SoundCloud, Spotify (links, text search, and playlists)
  • High-Quality Audio: Optimized for smooth playback even on low-memory hosting (512MB+)
  • Queue Management: Advanced queue system with shuffle, loop, and clear options
  • Playlist Support: Create, save, and manage custom playlists
  • Autoplay: Intelligent autoplay system for continuous music
  • 24/7 Mode: Keep the bot in voice channels 24/7
  • Music Cards: Beautiful custom-generated music cards with thumbnails
  • Live Lyrics: Real-time synchronized lyrics display
  • Track History: Automatic history tracking for played songs

๐ŸŽจ User Experience

  • Multi-Language Support: 20+ languages available [ soon ]
  • Interactive Controls: Button-based controls for easy music management
  • Progress Tracking: Real-time progress bars and track information
  • Visual Feedback: Professional embeds and status updates
  • Error Handling: Graceful error handling with user-friendly messages

โšก Performance Optimizations

  • Low-Memory Mode: Optimized for hosting environments with limited RAM (512MB+)
  • Efficient Updates: Reduced update frequencies to minimize CPU/memory usage
  • Smart Caching: Optimized thumbnail fetching with fallback systems
  • Resource Management: Automatic cleanup and memory optimization

๐Ÿ› ๏ธ Advanced Features

  • Filter System: Multiple audio filters (bassboost, nightcore, karaoke, etc.)
  • Volume Control: Precise volume adjustment (10-100%)
  • Seek Functionality: Jump to specific positions in tracks
  • Vote Skip: Democratic skip system for queue management
  • Track Info: Detailed track information display

๐Ÿ“‹ Requirements

  • Node.js: v16.0.0 or higher
  • Discord Bot Token: Get one from Discord Developer Portal
  • Lavalink Server: Self-hosted or use a public Lavalink node
  • MongoDB Database: For playlist and history storage
  • Spotify API (Optional): For Spotify support

๐Ÿš€ Installation

1. Clone the Repository

git clone https://github.com/GlaceYT/PrimeMusic-Lavalink.git
cd PrimeMusic-Lavalink

2. Install Dependencies

npm install

3. Configure Environment

Create a .env file in the root directory:

TOKEN=your_discord_bot_token_here

4. Configure config.js

Edit config.js with your settings:

module.exports = {
  TOKEN: "", // Leave empty if using .env file
  language: "en",
  ownerID: ["your_user_id_here"],
  mongodbUri: "your_mongodb_connection_string",
  spotifyClientId: "your_spotify_client_id", // Optional
  spotifyClientSecret: "your_spotify_client_secret", // Optional
  nodes: [
     {
            name: "GlaceYT",
            password: "glace",
            host: "us-01.strixnodes.com",
            port: 8003,
            secure: false
    }
  ]
}

5. Enable Discord Intents

In the Discord Developer Portal:

  • Go to your bot application
  • Navigate to Bot โ†’ Privileged Gateway Intents
  • Enable:
    • โœ… MESSAGE CONTENT INTENT
    • โœ… SERVER MEMBERS INTENT

6. Run the Bot

npm start

โš™๏ธ Configuration

Basic Settings

Option Description Default
TOKEN Discord bot token "" (use .env)
language Default bot language "en"
ownerID Bot owner user IDs []
mongodbUri MongoDB connection string Required
embedColor Embed accent color (hex) "#1db954"
activityName Bot activity text "YouTube Music"
activityType Activity type "LISTENING"

Performance Settings

Option Description Default
lowMemoryMode Enable low-memory optimizations true
generateSongCard Generate custom music cards true
showVisualizer Show audio visualizer false
showProgressBar Show progress bar in embeds false

Lavalink Nodes

Configure your Lavalink nodes in the nodes array:

nodes: [
  {
    name: "NodeName",
    password: "youshallnotpass",
    host: "localhost",
    port: 2333,
    secure: false
  }
]

๐ŸŽฎ Usage

Basic Commands

Command Description
/play <song> Play a song from YouTube, SoundCloud, or Spotify
/pause Pause the current track
/resume Resume the paused track
/skip Skip to the next song
/stop Stop playback and clear queue
/queue View the current queue
/volume <1-100> Adjust playback volume
/nowplaying Show current track information

Advanced Commands

Command Description
/shuffle Shuffle the queue
/loop Toggle loop mode (track/queue)
/seek <time> Jump to a specific time in the track
/filters Apply audio filters
/autoplay Toggle autoplay mode
/24/7 Toggle 24/7 mode
/playlist create <name> Create a custom playlist
/playlist savequeue <name> Save current queue as playlist

๐ŸŒ Supported Languages

The bot supports 11 languages:

  • ๐Ÿ‡บ๐Ÿ‡ธ English (en)
  • ๐Ÿ‡ช๐Ÿ‡ธ Spanish (es)
  • ๐Ÿ‡ซ๐Ÿ‡ท French (fr)
  • ๐Ÿ‡ฉ๐Ÿ‡ช German (de)
  • ๐Ÿ‡จ๐Ÿ‡ณ Chinese Simplified (cn)
  • ๐Ÿ‡ฏ๐Ÿ‡ต Japanese (ja)
  • ๐Ÿ‡ฐ๐Ÿ‡ท Korean (ko)
  • ๐Ÿ‡ท๐Ÿ‡บ Russian (ru)
  • ๐Ÿ‡ต๐Ÿ‡น Portuguese (pt)
  • ๐Ÿ‡ธ๐Ÿ‡ฆ Arabic (ar)
  • ๐Ÿ‡ป๐Ÿ‡ณ Vietnamese (vi)

Change language with: /language <language_code>


๐ŸŽต Supported Platforms

  • YouTube - Videos, playlists, and search
  • SoundCloud - Tracks and playlists
  • Spotify - Tracks, albums, and playlists (requires API credentials)

โšก Performance Optimizations

This bot is optimized for low-memory hosting environments:

  • Reduced Update Frequency: Progress updates every 15 seconds (instead of 5)
  • Smart Card Generation: Music cards regenerate every 90 seconds
  • Efficient Health Checks: Optimized monitoring intervals
  • Memory Management: Automatic cleanup and resource optimization
  • Fast Thumbnail Fetching: Direct YouTube URLs with fallback system

Recommended Hosting Specs

  • Minimum: 512MB RAM, 1 CPU core
  • Recommended: 1GB+ RAM, 2+ CPU cores
  • Node.js: v16.0.0 or higher

๐Ÿ“ Project Structure

PrimeMusic-Lavalink/
โ”œโ”€โ”€ commands/          # Bot commands
โ”‚   โ”œโ”€โ”€ basic/         # Basic commands (help, ping, stats)
โ”‚   โ”œโ”€โ”€ music/         # Music commands (play, pause, skip)
โ”‚   โ”œโ”€โ”€ playlist/      # Playlist management
โ”‚   โ””โ”€โ”€ utility/       # Utility commands
โ”œโ”€โ”€ events/            # Discord event handlers
โ”œโ”€โ”€ languages/         # Language files
โ”œโ”€โ”€ utils/             # Utility functions
โ”‚   โ”œโ”€โ”€ musicCard.js   # Music card generator
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ UI/                # UI assets (icons, colors)
โ”œโ”€โ”€ config.js          # Bot configuration
โ”œโ”€โ”€ bot.js             # Main bot file
โ”œโ”€โ”€ player.js          # Music player logic
โ”œโ”€โ”€ lavalink.js        # Lavalink connection manager
โ””โ”€โ”€ index.js           # Entry point

๐Ÿ› Troubleshooting

Bot doesn't respond to commands

  • Check if bot has proper permissions
  • Verify MESSAGE CONTENT INTENT is enabled
  • Ensure bot is online and connected

Music doesn't play

  • Verify Lavalink node is running and accessible
  • Check node configuration in config.js
  • Ensure bot has permission to join voice channels

Thumbnails not loading

  • Bot will automatically use music icon placeholder
  • Check internet connection for thumbnail fetching
  • YouTube thumbnails are fetched automatically from track URI

High memory usage

  • Enable lowMemoryMode: true in config
  • Disable showVisualizer if not needed
  • Consider using generateSongCard: false for minimal memory usage

๐Ÿค Support


๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Credits


โญ Star this repository if you find it helpful!

Made with โค๏ธ by GlaceYT

About

Advanced Lavalink-Powered Discord Music Bot (Discord.js v2 Display Components)

Topics

Resources

Stars

74 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages