Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/twlite/lavalink-static

Simple node module to download lavalink binary
https://github.com/twlite/lavalink-static

bot discord discord-js downloader lavadl lavalink lavalink-static lavaplayer music music-bot node npm

Last synced: about 1 month ago
JSON representation

Simple node module to download lavalink binary

Awesome Lists containing this project

README

        

# Lavalink Static

Downloads **[`Lavalink.jar`](https://github.com/freyacodes/Lavalink)**

# Download Channels
- latest
- dev

# Example

## CLI

```sh
$ lavalink-static --channel=dev --path=./downloads
```

Downloads lavalink dev build to the given path.

## Regular

```js
const lavadl = require("lavalink-static");

let start;
lavadl({
channel: "dev",
outPath: `${__dirname}/downloads`,
onStart: (url) => {
start = Date.now();
console.log(`Downloading lavalink from ${url}`);
},
onFinish: (path) => {
console.log(`Took ${Date.now() - start}ms\nPath: ${path}`);
},
onError: console.error
});
```

## Get binary path

```js
const downloaded = lavadl.getPath();
if (!downloaded) console.log("No downloads found!");
else console.log(downloaded.path); // ex: { fileName: "Lavalink-dev.jar", path: "...", channel: "dev" }
```