Naseem
Naseem
DFDimensional Fun
Created by Naseem on 12/1/2023 in #lavaclient
ReferenceError: sendWithDiscordLib is not defined
I am getting this error:
Uncaught Promise Rejection ReferenceError: sendWithDiscordLib is not defined
at Node.sendGatewayPayload (C:\Users\nasee\Desktop\projects\yuki\src\index.js:41:42)
at Player.connect (C:\Users\nasee\Desktop\projects\yuki\node_modules\lavaclient\dist\lib\Player.js:49:19)
at Object.run (C:\Users\nasee\Desktop\projects\yuki\src\slashCommands\music\play.js:14:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Uncaught Promise Rejection ReferenceError: sendWithDiscordLib is not defined
at Node.sendGatewayPayload (C:\Users\nasee\Desktop\projects\yuki\src\index.js:41:42)
at Player.connect (C:\Users\nasee\Desktop\projects\yuki\node_modules\lavaclient\dist\lib\Player.js:49:19)
at Object.run (C:\Users\nasee\Desktop\projects\yuki\src\slashCommands\music\play.js:14:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Here is my code of play command:
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
category: 'music',
data: new SlashCommandBuilder()
.setName('play')
.setDescription('Play a song!')
.addStringOption(option => option.setName('name').setDescription('Name of the song.').setRequired(true)),
run: async (client, interaction) => {
const results = await client.music.rest.loadTracks("ytsearch:kurdo business narcotic");
console.log(interaction.member.voice)
await client.music
.createPlayer(interaction.guildId)
.connect(interaction.member.voice.channelId)
.play(results.tracks[0]);
},
};
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
category: 'music',
data: new SlashCommandBuilder()
.setName('play')
.setDescription('Play a song!')
.addStringOption(option => option.setName('name').setDescription('Name of the song.').setRequired(true)),
run: async (client, interaction) => {
const results = await client.music.rest.loadTracks("ytsearch:kurdo business narcotic");
console.log(interaction.member.voice)
await client.music
.createPlayer(interaction.guildId)
.connect(interaction.member.voice.channelId)
.play(results.tracks[0]);
},
};
22 replies
DFDimensional Fun
Created by Naseem on 7/28/2023 in #lavaclient
Error: Unexpected server response: 404
Hey I have downloaded the newest java to be able to use lavasrc but since then lavaclient isn't working anymore.
6 replies