Bot spams a response that should only be send once and wont play the music it should.

[6] 48238
pierrekorell@Gott lydiaversuch3 % node bot.js
Debugger attached.
Lydia the allmighty is online
TypeError: MessageButton is not a constructor
at /Users/pierrekorell/lydiaversuch3/bot.js:60:21
at Array.map (<anonymous>)
at Client.<anonymous> (/Users/pierrekorell/lydiaversuch3/bot.js:59:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[6] 48238
pierrekorell@Gott lydiaversuch3 % node bot.js
Debugger attached.
Lydia the allmighty is online
TypeError: MessageButton is not a constructor
at /Users/pierrekorell/lydiaversuch3/bot.js:60:21
at Array.map (<anonymous>)
at Client.<anonymous> (/Users/pierrekorell/lydiaversuch3/bot.js:59:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
This is the error code. The entire bot code is too long it got moves into that file. Idk how to change that. I have been trying to get music playback to work for a few hours now. I tried play-dl ytdl and now discord-ytdl. The bot doesnt seem to playback the music and just spams the song selection 4 times. I am using nodejs 18.8.0.
7 Replies
d.js toolkit
d.js toolkit9mo 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
Jonas
Jonas9mo ago
Could be that you have the same bot process running more than once, so each process gives out a response?
TwoHands
TwoHands9mo ago
I usually terminate the processes but ill just try restarting vsc and trying it again Nontheless the bot wont play music I got it working on ytdl but it randomly terminated around halfway through the song
treble/luna
treble/luna9mo ago
MessageButton is v13 & we do not support tos violations
TwoHands
TwoHands9mo ago
Its just a private project which is not going to play on any server. Its only playing for test purposes to the people that develop it and will be shutdown once finished.
treble/luna
treble/luna9mo ago
Its still agains tos
TwoHands
TwoHands9mo ago
Good to know. Thanks for telling me. I'll get another project to continue learning then. Thanks for the help.