Samu_
Samu_
DIAdiscord.js - Imagine an app
Created by Samu_ on 12/17/2024 in #djs-voice
Bot connect but doesnt play anything
if I kick the bot from the voice channel I get this error:
C:\Users\Administrator\Desktop\Voice Support\node_modules\@discordjs\voice\dist\index.js:373
this.socket.once("close", () => reject(new Error("Cannot perform IP discovery - socket closed")));
^

Error: Cannot perform IP discovery - socket closed
at Socket.<anonymous> (C:\Users\Administrator\Desktop\Voice Support\node_modules\@discordjs\voice\dist\index.js:373:46)
at Object.onceWrapper (node:events:627:28)
at Socket.emit (node:events:525:35)
at socketCloseNT (node:dgram:754:8)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on VoiceConnection instance at:
at VoiceConnection.onNetworkingError (C:\Users\Administrator\Desktop\ Voice Support\node_modules\@discordjs\voice\dist\index.js:1930:10)
at Networking.emit (node:events:513:28)
at C:\Users\Administrator\Desktop\Voice Support\node_modules\@discordjs\voice\dist\index.js:740:32
at processTicksAndRejections (node:internal/process/task_queues:96:5)
C:\Users\Administrator\Desktop\Voice Support\node_modules\@discordjs\voice\dist\index.js:373
this.socket.once("close", () => reject(new Error("Cannot perform IP discovery - socket closed")));
^

Error: Cannot perform IP discovery - socket closed
at Socket.<anonymous> (C:\Users\Administrator\Desktop\Voice Support\node_modules\@discordjs\voice\dist\index.js:373:46)
at Object.onceWrapper (node:events:627:28)
at Socket.emit (node:events:525:35)
at socketCloseNT (node:dgram:754:8)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on VoiceConnection instance at:
at VoiceConnection.onNetworkingError (C:\Users\Administrator\Desktop\ Voice Support\node_modules\@discordjs\voice\dist\index.js:1930:10)
at Networking.emit (node:events:513:28)
at C:\Users\Administrator\Desktop\Voice Support\node_modules\@discordjs\voice\dist\index.js:740:32
at processTicksAndRejections (node:internal/process/task_queues:96:5)
9 replies
DIAdiscord.js - Imagine an app
Created by Samu_ on 12/17/2024 in #djs-voice
Bot connect but doesnt play anything
ye Im not, but the bot works on my pc also in v13, I literally copyied and pasted it in my vps (with the same ffmpeg and node version) but it doesnt play anything
9 replies
DIAdiscord.js - Imagine an app
Created by Samu_ on 12/17/2024 in #djs-voice
Bot connect but doesnt play anything
so apparently the bot works well on my pc but in my windows vps it doesnt play anything
9 replies
DIAdiscord.js - Imagine an app
Created by Samu_ on 12/17/2024 in #djs-voice
Bot connect but doesnt play anything
const AUDIO_FILE_PATH = path.join(__dirname, 'audio.mp3');


const channel = await client.channels.fetch(VOICE_CHANNEL_ID);
if (!channel || channel.type !== 'GUILD_VOICE') {
console.error('Il canale specificato non è valido o non è un canale vocale.');
return;
}

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator
});

const player = createAudioPlayer();
const resource = createAudioResource(AUDIO_FILE_PATH);

player.play(resource);
connection.subscribe(player);



console.log('Audio in riproduzione nel canale vocale.');
};
const AUDIO_FILE_PATH = path.join(__dirname, 'audio.mp3');


const channel = await client.channels.fetch(VOICE_CHANNEL_ID);
if (!channel || channel.type !== 'GUILD_VOICE') {
console.error('Il canale specificato non è valido o non è un canale vocale.');
return;
}

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator
});

const player = createAudioPlayer();
const resource = createAudioResource(AUDIO_FILE_PATH);

player.play(resource);
connection.subscribe(player);



console.log('Audio in riproduzione nel canale vocale.');
};
9 replies
DIAdiscord.js - Imagine an app
Created by Samu_ on 12/17/2024 in #djs-voice
Bot connect but doesnt play anything
this is my code:
9 replies