Git Product home page Git Product logo

lavalink.js's Introduction

Lavalink.js

Lavalink.js is a JavaScript wrapper wich you can use with your Discord.js bot. It uses the Lavalink technology to broadcast music, so you need Java SE 11 installed in your machine.

First of all, I would to thank Matthieu#2050, a friend and a hobbyist developer wich helped me for implementing the websocket and for fixing some bugs. To thanks them, you can visit his website: Matthieu Dev :D

Wrapper installation:

First of all you have to install this module on your projet if you want to use it:

# Using Yarn:
yarn add lavalink.js

# Or using NPM:
npm install lavalink.js

Java JDK installation:

Let's take care about the Java part currently!
The Java JRE 11 or higher shoud be installed on your machine. If you have an old version of the Java JRE od JDK please uninstall it and reboot your machine. Then open your internet browser and paste this URL to the address bar: Java SE downloads. You should then arrive on this webpage:

Java SE downloads webpage
Scroll down to find download versions, and choose the Java SE 11 (LTS) version for stable, and Java SE 13 version for current. Next click on JDK download. Then download the adapted setup for your machine, and install it by following indicated instructions, or by reading docs for Linux/Unix systems.

Note that is you're using Windows operating system you have to add the Java JDK to path to use it directly from any terminal. For it please read this: How to set JAVA_HOME in Windows 10.

Lavalink server installation:

Create on your project root directory a folder named 'lavalink'. Next download the Lavalink server into it. Then you have to create a file in your code editor, always in the same directory, and named 'application.yml'. This file allow the Lavalink server configuration, by providing broadcasting settings and by providing server host, port and password. Complete this file by pasting this configuration example. Save the file then.

Lavalink server launching:

To launch the Lavalink server please ensure you are in it's directory.

Before to launch your application, if it needs Lavalink to work, launch the Lavalink server by following the instructions bellow.

# Locally:
java -jar Lavalink.jar

# With PM2:
pm2 start java --name="Lavalink" -- -jar Lavalink.jar

Use the wrapper for your Discord.js bot:

To use lavalink.js and Lavalink on your Discord bot, you have a provided example on the repository, at example/discord.js/client.js. The example bot include all wrapper features for the moment, and will be updated when the wrapper will be.

An opensource music bot using lavalink.js is planned soon ^^ In the meantime, please wait and the bot will arrive :D

Need help?

If you need help, you can join the support server and ask for it, somebody will answer if they can help, don't worry ๐Ÿ˜‰

An issue, a bug?

If you encounter an issue, a bug, either you can join the support server (the link is above), or you can open an issue on GitHub. Thanks for contributing to the module!

lavalink.js's People

Contributors

androz2091 avatar

Stargazers

MaXoooZ avatar

Watchers

James Cloos avatar

Forkers

matthieucoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.