Example of using Erela.js with Lavalink for music bots written in Discord.js
Note: Java v11 or newer is required to run the Lavalink.jar. Java v13 is recommended. If you are using sdkman then its a manager, not Java, you have to install sdkman and use sdkman to install Java
Warning: Java v14 has issues with Lavalink.
NPM :
Download repository and open them in editor (for example Visual Studio Code). Then run npm install
in a Terminal window
It will automatically create node_modules folder and download required dependencies
Set up your Discord token in the main.js file on line 98 and set up your prefix in the main.js file on lines 47, 57, 75 (default is e!)
- Start the Lavalink server by running
npm run lavalink
in a Terminal window. - Finally run bot by running
npm run bot
in a NEW Terminal window.
- You need to change them in main.js file on line 88
await command.run(...);
- And in each command file (for example play.js or pause.js) on line
module.exports.run = (...)
- You need to change that in main.js file on lines 47, 57
name: "e!help",
- You need to change them in command file (for example play.js or pause.js) on line
module.exports.requirements = {...}
- ownerOnly - this command can run only bot owner
- You need to change your id in main.js file on line 85
message.author.id !== 123456789
- You need to change your id in main.js file on line 85
- userConnection - this command requires the user to connect to a voice channel
- ownerOnly - this command can run only bot owner
You can use plugins below to extend Erela.js' features easily.
Note: These are the only ones shown before being published, check the GitHub repository for a complete list.
- erela.js-spotify - Converts a Spotify URL into a UnresolvedTrack to play later.
👤 Karel Krýda
- Author
- Github: @karelkryda
👤 Solaris
- Author
- Website: https://solaris.codes/
- Github: @Solaris9
👤 Anish Shobith
- Contributor
- Github: @Anish-Shobith
👤 ayntee
- Contributor
- Github: @ayntee