1.0.0 • Published 2 years ago

@overleap/lavajs v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Installation

  • Using Node Package Manager (NPM):
npm install @overleap/lavajs
  • Or using Yarn:
yarn add @overleap/lavajs

Important

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.

Documentation and Support

  • The latest changelog can be found here.
  • Our official documentation is available here.
  • For any further query and support join us at Overleap discord.

Basic Startup Guide

  • Create an application.yml file in the Lavalink.jar directory and paste this example in it.
  • Run the Lavalink.jar file in a terminal window using java -jar Lavalink.jar.

IMPORTANT

  • You need to have access to the incoming VOICE_SERVER_UPDATE and VOICE_STATE_UPDATE packets.
  • You need to pass the data to Client#sendVoiceUpdate(payload).

Example code for running the client:

const client = new Client(
	{
		botId: "BOT_ID",
		send: (guildId, payload) => {
			// A Promise method implementation to pass payload to Discord
		},
	},
	[
		{
			host: "localhost",
			port: 2333,
			password: "your_server_password",
		},
	]
);

client.connectAll();

Bot Examples

  • TODO

Author