Coder Social home page Coder Social logo

azusfin / lavacoffee Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 1.77 MB

A fast and rich-featured lavalink wrapper for node.js

Home Page: https://Azusfin.github.io/lavacoffee/index.html

License: BSD 3-Clause "New" or "Revised" License

TypeScript 100.00%
discord-js discord-music-bot discordjs eris lavalink lavalink-client lavalink-music lavalink-wrapper

lavacoffee's Introduction

Hello there!

followers

Hello, my name is Azusfin. A human who is interested in programming and games but prefer to sleep instead. I'm still in a learning state so i wouldn't call myself an experienced programmer.

Profile Github Stats

Most Used Language

🛠 My Current Projects

lavacoffee's People

Contributors

azusfin avatar xzfirzal avatar yuzutheneko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lavacoffee's Issues

Load Balancing is not working

Lavacoffee is working much better for me than the other clients which had much more issues. But I'm running into this issue where load balancing just refuses to work and always uses the first node even if the first node is down it will not use the second node if i only pass the second node to the config and not the first it uses the second node but when passing multiple it always uses the first even if the first is pinned at 100% CPU. Does anybody know why this is happening?

Doesn't sending filters data

Just tried lavacoffee filters feature, but it seems like lavacoffee doesn't sending filters data to lavalink server, for sure tried this example, but nope. Checked lavalink logs as well, doesn't seems to be.
image

TypeError: (0 , validators_1.check) is not a function

Describe the problem: I just clone lavacoffee GitHub repo and configure everything, when I trying to execute example (in test folder) found this error (0 , validators_1.check) is not a function from CoffeeRoutePlanner. To ensure I've also tried npm version but got different error TypeError: Cannot read properties of undefined (reading 'value'). Supposed descriptor is undefied.

GitHub Version Error:

/home/luha/Desktop/lavacoffee/src/structures/CoffeeRoutePlanner.js:95
        (0, validators_1.check)(function (method, address) {
                               ^

TypeError: (0 , validators_1.check) is not a function
    at /home/luha/Desktop/lavacoffee/src/structures/CoffeeRoutePlanner.js:95:32
    at Object.<anonymous> (/home/luha/Desktop/lavacoffee/src/structures/CoffeeRoutePlanner.js:102:2)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/luha/Desktop/lavacoffee/src/structures/CoffeeNode.js:78:28)

npm version error:

/home/luha/Desktop/lavacoffee/test/node_modules/lavacoffee/dist/utils/decorators/validators.js:7
        const method = descriptor.value;
                                  ^

TypeError: Cannot read properties of undefined (reading 'value')
    at decorate (/home/luha/Desktop/lavacoffee/test/node_modules/lavacoffee/dist/utils/decorators/validators.js:7:35)
    at __decorate (/home/luha/Desktop/lavacoffee/test/node_modules/lavacoffee/dist/structures/CoffeeRoutePlanner.js:5:130)
    at /home/luha/Desktop/lavacoffee/test/node_modules/lavacoffee/dist/structures/CoffeeRoutePlanner.js:94:5
    at Object.<anonymous> (/home/luha/Desktop/lavacoffee/test/node_modules/lavacoffee/dist/structures/CoffeeRoutePlanner.js:102:2)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)

Not absolutely sure is that my problem somewhere else, since I'm pretty new in TS, can you point me out if I've done any mistake? Used lavacoffee example bot https://github.com/Azusfin/lavacoffee/blob/main/test/index.ts

Thanks!

Maximum call stack size exceeded

For myself, it occurred on playerMove event when I'm trying to destroy a current player instance when user manually disconnect the bot from voice channel.
When sending data to lavalink somehow seems like node can't able to clean up previous stack
Error message

Exception in PromiseRejectCallback:                                          
/home/luha/Desktop/Erna/node_modules/lavacoffee/dist/structures/CoffeeNode.js:178                                                                         
        return new Promise((resolve, reject) => {                            
               ^                                                                                                      
RangeError: Maximum call stack size exceeded                                 
Exception in PromiseRejectCallback:                                          
/home/luha/Desktop/Erna/node_modules/lavacoffee/dist/structures/CoffeeNode.js:178                                                                         
        return new Promise((resolve, reject) => {                            
               ^                                                                                                          
RangeError: Maximum call stack size exceeded                                 
Exception in PromiseRejectCallback:                                          
/home/luha/Desktop/Erna/node_modules/lavacoffee/dist/structures/CoffeeNode.js:178                                                                         
        return new Promise((resolve, reject) => {                            
               ^                                                                                                              
RangeError: Maximum call stack size exceeded                                 
/home/luha/Desktop/Erna/node_modules/lavacoffee/dist/structures/CoffeePlayer.js:86                                                                        
        const node = this.lava.nodes.get(this.options.node);                 
                                     ^                                                                            
RangeError: Maximum call stack size exceeded

Implementation

export default async (client, player, oldChannel, newChannel) => {
    if (!newChannel) {
        setTimeout(() => {
            player.queue.clear();
            if (player) player.destroy();
        }, 2000);
    }
};

error when i run bot

D:\Programing\coding\My Code\YOUTUBE TUTORIALS\Lavalink Music>node .
node:internal/modules/cjs/loader:488
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/utils' is not defined by "exports" in D:\Programing\coding\My Code\YOUTUBE TUTORIALS\Lavalink Music\node_modules\lavacoffee\package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (D:\Programing\coding\My Code\YOUTUBE TUTORIALS\Lavalink Music\index.js:6:23) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.1.0```

fix this and give example how to connect a node

How to use resumeConfig and autoResume

How exactly use the resumeConfig and autoResume option, coz when i set the resumeConfig and the autoResume it's doesn't do anything, the music is stoping not continuing.

And also, i look into the lavalink logs, the resumeKey is doesn't exist

node error

bro idk how to add lavalink nodes can you send code example with working lavalink server please bro
its so confusing

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.