Vulkava
A lavalink wrapper in Node.JS
🔌
Installation
You will need NodeJS v14+ and a running lavalink server.
$ npm i vulkava
$ yarn add vulkava
$ pnpm add vulkava
A lavalink wrapper in Node.JS
You will need NodeJS v14+ and a running lavalink server.
$ npm i vulkava
$ yarn add vulkava
$ pnpm add vulkava
Currently I see that the play
method of the Player
class checks the queue of the music player and in case there are no more songs it throws an error.
I don't want to use the built-in queue because I want to use my own queue but I don't see an option to disable the already built-in queue.
enhancementResponse track thumbnail results are always undefined, however, there's no property that exists called data.info.thumbnail
. YouTube videos always will have video ID, by using that ID we can get video thumbnails instead of relying on lavalink.
Before:
After:
As we can see there's no property existing name thumbnail
Although we can extend the DefaultQueue class we can also access tracks property on the DefaultQueue class by default so there is no sense it not being reachable x)
When playing certain links e.g. Spotify links, the lib fails to function completely for some reason. I'm not sure why this happens but i get a range of errors when attempting to queue a spotify song.
Error 1:
vulkava\lib\Player.js:279
track: this.current.encodedTrack,
TypeError: Cannot read properties of undefined (reading 'encodedTrack')
Error 2:
(Track Exception) TypeError: Cannot read properties of undefined (reading 'setRequester')
Cause: I've narrowed it down to it only ocurring when coming in contact with an unresolved track, The error in the code is caused by the lib originating from:
vulkava\lib\UnresolvedTrack.js:35
Vulkava Version: 1.5.6
bugThis is useful to know which server is using the play queue and more information about the current player in the play queue.
I do this PR because I ran into the problem that for example the clear()
method does not receive any parameters however my play queue is database based so I need to know which server to clear the play queue to, with this PR I will get the information I need about the server and the player in the play queue.
Would it be possible to maybe create a discord server about this lib so people could receive help etc inside of the discord server,
Would help out quite a bit, If there is already a server could you link me to it?
Thanks!
Adds abstraction for player queue.
const myCustomQueue = new MyQueue();
const player = <vulkava>.createPlayer({
// (...)
queue: myCustomQueue
});
Closes #11
format: 'PCM' | 'MP3'
property on recorder instead of encodeToMp3 (https://github.com/davidffa/Vulkava/commit/f6387ecf68363cfc41254972bd8d5ad1ddbe1cd0)Emit trackException instead of error event on unresolved track build failure (https://github.com/davidffa/Vulkava/commit/ad6e256898ba8f43bc0e5d9086aa8f10d419ec27)
Source code(tar.gz)class MyQueue extends DefaultQueue {
constructor() {
super(); // Needed to initialize `this.tracks`
}
// new method
addTracks(tracks) {
this.tracks = this.tracks.concat(tracks);
}
}
// When creating new players
const player = vulkava.createPlayer({
// guildId, voiceChannelId...,
queue: new MyQueue()
});
P.S.: If you want to re-implement all of DefaultQueue methods, extend AbstractQueue class.
player.queue
array methods and properties were removed. See the new methods and properties on DefaultQueue, or implement your own Queue class (see above).Update dependencies
Refactored external sources code (Spotify, Deezer, AppleMusic) (https://github.com/davidffa/Vulkava/commit/ceee5e51f281f44e3cae66ea577a9d178f7bd7b6, https://github.com/davidffa/Vulkava/commit/021a055a3d1e051bb02e792a7b987b9b65975508)
Add unit tests for external sources (https://github.com/davidffa/Vulkava/commit/7b47b329024cdca1a9a268b233c35112e68be8d9)
Vulkava A lavalink wrapper in Node.JS Documentation Common errors/Issues ?? Installation You will need NodeJS v14+ and a running lavalink server. Offi
Laffey An adorable lavalink discord music bot that has a lot of features inside it. First Project of Weeb-Devs Features: ✓ High quality ✓ Support filt
Msv Music ?? A Advanced Discord Music Bot Made With Lavalink And Have Many Premium Features with filters and more willl be add soon About Msv Music ??
Discord.js Lavalink Music Bot using erela.js A Advance Discord Music Bot Like Hydra Erela.js docs Note this Discord Bot Repository is the Same as for
About This is an unofficial discordlist.gg package written for Typecript and JavaScript to interact with its public API. If you need help using this p
Discord Buttons Plugin Easiest medium to use buttons with any discord API wrapper /* Generate 1st Button with "Yes" lable on it */ const button1
ezvoice A lightweight package designed to make it just a bit easier to play and record sound with @discordjs/voice Discord: nab138#2035 Examples Conne
Featureful Selfbot wrapper for its Discord Selfbot. This library provides non-standard stuff such farming, intervals, and respect the ratelimit.
spotify.ts About spotify.ts is an wrapper built around Spotify's Web API. Features Fast Object Oriented Typescript, ESM, CJS support Easy to Use Insta
heyooh Unofficial javascript wrapper to WhatsApp Cloud API. Its the javascript port for heyoo Features supported Sending messages Sending Media (image
A lightweight Spotify API wrapper that allows you to display the music you're currently listening to ?? ?? ?? Getting started ⏪ Prerequisites Create a
Shotstack Pexels Slideshow Video Demo This project demonstrates how to use the Shotstack cloud video editing API to create a video using an HTML form
Unimore-Bot Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram I
Discord-Telegram-bridge A small and fast telegram to discord chat bridge, written in Node.js Setup: If you want to run it on heroku, you can just clic
How It Works identity: { username: 'YOUR BOTS USERNAME', <-- This is where you place the username that you gave the bot account password: '
Anti-Crosspost Discord Bot This bot is a cool Discord bot made in discord.js using Node.JS. It detects when a user cross-posts a message in multiple c
welcome2voice-bot ?? NODE.TS - Play a welcome sound every time someone joins the voice channel. ?? INVITE-ME ?? Installation Clone project git clone g
?? Denky Bot Denky is a brazilian Discord bot, build with Node.js, TypeScript and discord.js. ⚙️ How to Create a Discord application. Guide Install No
Discord.js-Bot-Template This is a very simple template for making bots using Discord.js/Node.js Tutorial: To begin, Install Node.js here. After Node.J