Bot is not playing

Code:
const player = createAudioPlayer({
behaviors: {
noSubscriber: NoSubscriberBehavior.Stop,
},
debug: true,
});
const resource = createAudioResource("/home/toby/Downloads/youtube_1fRq1QzcBRc_audio short.mp3");

player.on("debug", console.log);
player.on("error", console.error);

const connection = joinVoiceChannel({
channelId: interaction.member!.voice.channel!.id,
guildId: interaction.guild!.id,
adapterCreator: interaction.guild!.voiceAdapterCreator,

debug: true,
});

connection.on("debug", console.log);
connection.on("error", console.error);

connection.subscribe(player);
player.play(resource);
const player = createAudioPlayer({
behaviors: {
noSubscriber: NoSubscriberBehavior.Stop,
},
debug: true,
});
const resource = createAudioResource("/home/toby/Downloads/youtube_1fRq1QzcBRc_audio short.mp3");

player.on("debug", console.log);
player.on("error", console.error);

const connection = joinVoiceChannel({
channelId: interaction.member!.voice.channel!.id,
guildId: interaction.guild!.id,
adapterCreator: interaction.guild!.voiceAdapterCreator,

debug: true,
});

connection.on("debug", console.log);
connection.on("error", console.error);

connection.subscribe(player);
player.play(resource);
Logs: Check logs.txt Other info:
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.17.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: not found

Encryption Libraries
- sodium-native: 4.1.1
- sodium: not found
- libsodium-wrappers: not found
- tweetnacl: not found

FFmpeg
- version: 6.1.1-3ubuntu5+esm1
- libopus: yes
--------------------------------------------------
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.17.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: not found

Encryption Libraries
- sodium-native: 4.1.1
- sodium: not found
- libsodium-wrappers: not found
- tweetnacl: not found

FFmpeg
- version: 6.1.1-3ubuntu5+esm1
- libopus: yes
--------------------------------------------------
package.json:
{
"dependencies": {
"@discordjs/opus": "^0.9.0",
"@discordjs/voice": "^0.17.0",
"discord.js": "^14.15.3",
"ioredis": "^5.4.1",
"sodium-native": "^4.1.1",
"tsx": "^4.16.0"
}
}
{
"dependencies": {
"@discordjs/opus": "^0.9.0",
"@discordjs/voice": "^0.17.0",
"discord.js": "^14.15.3",
"ioredis": "^5.4.1",
"sodium-native": "^4.1.1",
"tsx": "^4.16.0"
}
}
4 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
https://vsus.app
https://vsus.appOP4mo ago
Node v20.15.1
Youssef
Youssef4mo ago
install the encryption librairies
https://vsus.app
https://vsus.appOP4mo ago
i already have one also it was my discord client problem smh
Want results from more Discord servers?
Add your server