Closed Ascol14 closed 1 year ago
The library wants you to supply a send function in the Manager constructor so that it can signal gateway messages for you, but you provide no such thing. Should you want to just handle that yourself, you should just provide a function that just returns true, otherwise, it passes a packet parameter you can pass to your clients' shards' ws send function
Hello, I am working on a bot and I have a problem.
[ 7:37:17 PM ][ WARNING ]: TypeError: this.send is not a function at Manager.sendWS (/home/container/node_modules/lavacord/dist/lib/Manager.js:93:21) at Manager.join (/home/container/node_modules/lavacord/dist/lib/Manager.js:54:20) at Object.execute (/home/container/Buttons/Music/play.js:7:45) at Object.execute (/home/container/Events/Interaction/buttonInteraction.js:19:16) at Client.<anonymous> (/home/container/structure/handlers/Event.js:18:54) at Client.emit (node:events:539:35) at Client.emit (node:domain:475:12) at InteractionCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/InteractionCreate.js:81:12) at Object.module.exports [as INTERACTION_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
This block of code don't work :
const player = await client.manager.join({ guild: client.guilds.cache.get("1011556963001311302"), // Guild id channel: client.channels.cache.get('1014556398417367121'), // Channel id node: "1" // lavalink node id, based on array of nodes });
I don't know what I can do ?
I use discord.js@v14.
I am looking to the source code but if you can help me thanks.
Ascol14, bot developper