@lavaclient/queue
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Added queue functionality for Lavaclient

  • Official Lavaclient Plugin

Installation

Stable
yarn add @lavaclient/queue # or npm install
Beta
yarn add @lavaclient/queue@beta # or npm install

Usage

import "@lavaclient/queue/register";
import { Node } from "lavaclient";

const node = new Node({ ... });
const player = node.createPlayer("830616783199010857");

/* search for some tracks to play. */
const results = await node.rest.loadTracks("ytsearch:never gonna give you up");

/* add it to the queue. */
player.queue.add([ results[0] ]); // you can pass the requester in the second parameter
if (!player.playing) {
    player.queue.start();
}

melike2d © 2018 - present

Readme

Keywords

Package Sidebar

Install

npm i @lavaclient/queue

Weekly Downloads

278

Version

2.1.1

License

Apache-2.0

Unpacked Size

12.9 kB

Total Files

12

Last publish

Collaborators

  • the2dperson