/Erela.js-example-repo

Example of using Erela.js with Lavalink for music bots written in Discord.js

Primary LanguageJavaScriptMIT LicenseMIT

Erela.js-example-repo

Example of using Erela.js with Lavalink for music bots written in Discord.js

Documentation & Guides of Erela.js

Prerequisites

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.

Installation

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

Getting Started

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.

Possible custom adjustments

You can change commands variables

  • 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 can change bot status

  • You need to change that in main.js file on lines 47, 57 name: "e!help",

You can change command requirements

  • 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
    • userConnection - this command requires the user to connect to a voice channel

Plugins

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.

Contributors

👤 Karel Krýda

Contributors of Erela.js

👤 Solaris

👤 Anish Shobith

👤 ayntee