Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lavaclient/lavaclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LavaClient

discord servercodacy ratingnpm version

A simple, easy-to-use, and flexible node.js lavalink client.

  • Flexible: Lavaclient can be used with any discord library for node.js. Includes extendable structures like Player and Socket, making lavalink completely customizable.
  • Plugins: Provides a simple plugin class that can be loaded by the Manager, see the plugin guide.
  • Easy-to-use: LavaClient has a neat and user-friendly promise-based api.
  • Lightweight: Designed to be as light as possible, using only a few classes and dependencies.

Installation

node.js v12 or newer needed.

npm install lavaclient
# or
yarn add lavaclient

Usage

Documentation: https://lavaclient.github.io

import LavaClient from "lavaclient";

const nodes = [
  {
    id: "My Node",
    host: "localhost",
    port: 3000,
    password: "lavaclient-is-amazing"
  }
]

const manager = new LavaClient.Manager(nodes, {
  send(id, payload) {
    sendPayloadToDiscord()
    // check out our guides for an eris and discord.js examples.
  }
});

await manager.init("your client id.");

// Use these two methods when receiving voice state and server updates.
await manager.stateUpdate(<update>);
await manager.serverUpdate(<update>);

MeLike2D © 2020