• Stars
    star
    567
  • Rank 78,634 (Top 2 %)
  • Language
    TypeScript
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

lavalink music bot base in lavalink-client and discord.js v14

Version Contributors Forks Stargazers Issues MIT License Run on Repl.it Remix on Glitch


Pbot-plus

lavamusic

Lavamusic is a Discord music bot that uses Discord.js, Shoukaku, Prisma Client (ORM) database (MongoDB), and TypeScript.

Invite Lavamusic Β· Report Bug & Request Feature

πŸ”₯ Unique Features

  • Developed using Typescript and Discord.js v14
  • Advanced Music System
  • Customizable Prefix
  • Powerful Search Engine
  • 12 + Music Filters
  • Hybrid Command Handling (Slash and Normal Commands)
  • Highly Configurable
  • User-friendly and Easy to Use
  • 24/7 Music Playback
  • Playlist commands
  • Setup music channel

🎢 Support Sources

πŸ” Default Sources:

  • YouTube
  • SoundCloud
  • Twitch
  • Bandcamp
  • Vimeo
  • http

πŸ”Œ Plugin Sources: (Require: LavaLink v3.6.x)

Note: You need to install the plugins to use these sources

Need Help with plugins? Join our Discord Server and ask in the #support channel

πŸ“š Commands

Click to View Commands
Name Description Options
prefix Shows the bot's prefix
help Shows the help menu command: The command you want to get info
on
info Shows information about the bot
invite Sends the bot's invite link
ping Shows the bot's ping
clearqueue Clears the queue
join Joins the voice channel
leave Leaves the voice channel
nowplaying Shows the currently playing song
play Plays a song from YouTube or Spotify song: The song you want to play
pause Pauses the current song
queue Shows the current queue
remove Removes a song from the queue song: The song number
resume Resumes the current song
seek Seeks to a certain time in the song
shuffle Shuffles the queue
skip Skips the current song
skipto Skips to a specific song in the queue
stop Stops the music and clears the queue
volume Sets the volume of the player number: The volume you want to set

πŸ”§ Requirements

Before starting with the installation, you need to have the following:

πŸš€ Installation from source

  1. Clone the Lavamusic repository:
git clone  https://github.com/brblacky/lavamusic.git
  1. change the directory to Lavamusic
cd lavamusic
  1. Install the required packages:
npm install
  1. Set up your environment variables:

Create a .env file in the root directory of your project with the following variables:

TOKEN="." # Your bot token
PREFIX="!" # Your prefix
OWNER_IDS="859640640640640640, 859640640640640640" # Your ID
CLIENT_ID="960072976412340254" # Your bot client ID
GUILD_ID="859640640640640640" # Your server ID (if you want to use it for a single server)
PRODUCTION="true" # "true" for production
DATABASE_URL="mongodb+srv://Blacky:xxxxxxxxxxxx" # Your MongoDB URL
LAVALINK_URL="lava.moebot.xyz:443" # Your lavalink url
LAVALINK_AUTH="youshallnotpass" # Your lavalink password
LAVALINK_NAME="Blacky" # Your lavalink name
LAVALINK_SECURE= "true" # true for secure lavalink
  1. Generate the Prisma client:

If you using replit than read this:

go to prisma/schema.prisma and add engine type like this or remove // behind the engineType

generator client {
  provider = "prisma-client-js"
  engineType = "binary"
}

and then run this command

npx prisma generate
  1. Run the bot:
npm run start or npm start
  1. Invite the bot to your server:

Generate an invite link for your bot and invite it to your server using the Discord Developer Portal or using permissions calculator: https://discordapi.com/permissions.html

πŸš€ Installation using docker-compose

This section assumes you have docker and docker-compose installed and is running correctly.

Download the Docker-Compose file in a seperate folder like lavamusic.

Edit the Docker-Compose file and make sure to edit the following variables:

TOKEN="." # Your bot token and remember, don't show everyone your bot token
PREFIX="!" # Your prefix
OWNER_IDS="859640640640640640, 859640640640640640" # Your ID
CLIENT_ID="960072976412340254" # Your bot client ID
GUILD_ID="859640640640640640" # Your server ID (if you want to use it for a single server)
PRODUCTION="true" # "true" for production

For more information how to fill all the varialabes go to this page. You do not need to edit anything like the LAVA_LINK_URL, LAVA_LINK_AUTH, LAVA_LINK_NAME, LAVA_LINK_SECURE, DATABASE_URL, and the ports. Unless you know what your doing.

After saving your changes you can open a terminal and go to the same location as the docker-compose file. Then type the following:

docker-compose up -d

The above command will start all your services and your bot should be up and running!

To update, you only have to type the following:

docker-compose up --force-recreate --build -d
image prune -f

You can automate this by using Watchtower. The following should be sufficient:

docker run --detach \
    --name watchtower \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --restart on-failure \
    containrrr/watchtower --cleanup

Do note that the bot will restart itself to update to the latest!

πŸ”— Useful Links

πŸ“ Tutorial

A Tutorial has been uploaded on YouTube, Watch it by clicking here

πŸ“œ Contributing

Thank you for your interest in contributing to Lavamusic! Here are some guidelines to follow when contributing:

  1. Fork the repository and create a new branch for your feature or bug fix.
  2. Write clean and concise code that follows the established coding style.
  3. Create detailed and thorough documentation for any new features or changes.
  4. Write and run tests for your code.
  5. Submit a pull request with your changes.

Your contribution will be reviewed by the project maintainers, and any necessary feedback or changes will be discussed with you. We appreciate your help in making Lavamusic better!

πŸ” License

Distributed under the Apache-2.0 license License. See LICENSE for more information.

β˜• Donate

Do you like this project? Support it by donating

ko-fi paypal

πŸ‘₯ Contributors

Thanks goes to these wonderful people :