Bot wont talk & no error, how do i debug?
(selected opus tag bc i had to, to post idk what it is)
how do i debug this? since it says nothing in logs and doesnt even light up green
code (voiceConnectionAudioPlayer.player.play(...) is actually ran):
19 Replies
- 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[email protected]
@discordjs/[email protected]
and
node: v21.5.0
here are my intents:
ping me if you have a response
.wav file btw
first check it's actually reading the file correctly
& the types here may have a hint
:function: createAudioResource
@0.17.0
Creates an audio resource that can be played by audio players.notably, that readstream isn't explicitly mentioned
how do i check that
start by breaking down this line into separate calls
voiceConnectionAudioPlayer.player.play(createAudioResource(fs.createReadStream(filePath)));
but i suspect this is the issue
iirc you can just pass the path into createAudioResource
im pretty sure i tried that already, but i changed it cuz it was in some example
ill try it again tho
ah u are right
you can add a listener to the error event on audioplayer
wtf
this works
i swear i tried this before š
i hate coding ong
well ty
so much
ā¤ļø
yw
btw
do you know if i can delete the mp4 file right after i give the command to play it?
i think so
should be read entirely into memory
oh gotcha
how do you delete files in nodejs
btw lol
idk google it
oh its fs.rm
why is it an abreviation
cause rm is a native command in every system
ig