I made this bot because, well, groovy was taken down, so I made my own clone.
It's written in TypeScript and Discord.js V13, uses Lavalink for stable audio playback and erela.js as It's wrapper, it also uses the Sapphire Framework for Discord bots. (Note that this is a personal project, don't expect this code to be perfect and maybe it isn't a good idea to run it in a production environment)
- Node.js 16.6.x
- Java version 13 or higher (For Lavalink).
- Lavalink (Get it from here)
- Spotify API Client ID, and Client Secret. (Get them from here)
- A Discord bot token
This bot is pretty easy to set up, here's the guide:
- Clone this repo:
git clone https://github.com/iliveinsideyourwalls/lavalink-music-bot.git
- cd into de directory.
- Install dependencies:
npm install
-
Change the name of the
src/.env.example
file to.env
. -
Populate your .env file:
# Bot essentials
DISCORD_TOKEN=<Bot token>
OWNERS=<Your Discord ID>
PREFIX=<Some prefix>
# Default lavalink cradentials
LAVALINK_HOST=localhost
LAVALINK_PORT=2333
LAVALINK_PASSWD=youshallnotpass
# For spotify support
SPOTIFY_CLIENT_ID=<Your app-s client id>
SPOTIFY_CLIENT_SECRET=<Your app's client secret>
# You can put whatever in these
CLIENT_NAME=<Some name>
CLIENT_VERSION=<Some version>
# The default player's volume
DEFAULT_VOLUME=<Some value (I do not recommend more than 15)>
-
Now you have to set-up a Lavalink node, Get lavalink from here.
-
Make a folder called
lavalink_server
wherever you want (I recommend that you put it in the same folder as where you cloned the repo) -
Put the Lavalink executable in the folder you just made along with a application.yml file.
-
Run lavalink (Note that you must run the command in the same folder as the application.yml file):
java -jar <path/to/lavalink>/Lavalink.jar
- Now build the bot:
npm run build
- Run the bot:
node dist/index.js
If you see something like this then the bot is ready to go, now all there's left is inviting your bot to your server.