Using the Node Package Manager (NPM)
npm install @anonymousg/lavajs
You need the following things before you can kick off with LavaJS:
The setup has been covered in our official documentation. Do check it out if you have any doubts.
- Our official documentation is available here.
- For any further query and support join us at Projects.Me discord.
- Create an
application.yml
file in theLavalink.jar
directory and paste this example in it. - Run the
Lavalink.jar
file in a terminal window usingjava -jar Lavalink.jar
.
Example code for running the client:
// Require Discord and LavaJS clients
const { Client } = require("discord.js");
const { LavaClient } = require("@anonymousg/lavajs");
// New discord client instance
const bot = new Client();
// Create the node options
const nodes = [
{
host: "localhost",
port: 2333,
password: "mypassword",
},
];
// New LavaClient instance
const lavaClient = new LavaClient(bot, nodes);
// Login the discord client
bot.log("token");
Thanks to Johna-3212 for making the module compatible with TypeScript!
- ThatAnonymousG (Ratul Saha)
- Links: GitHub | Twitter | DscBio
- Donate The Development