Discord.js Music bot joins the voice channel and leaves it

The bot was joined to my voice channel and leaves it immediately. And the console log it says " undefined"

Just a thought, but are your bot permissions setup to allow connecting to voice channels?

Hello @SplitXPlayZ

Can you show me a full copy of the error you get in the logs, either by image, or by copying and pasting it here!

I allowed it, but nothing happens. Screenshot_115

It only says was undefined. Screenshot_114

Could you show the code you are using?

I fixed it, the problem was with the guild.

2 days later the bot again starting to say undefined, idk this the problem now.

can you tell mw how you solved this I have the same problem

Please Don’t bump old Post.

This is happening with me now also, i tested the some exact code i am using in glitch. c o m, in replit.com and also in visual studio it works perfect, it only does not work as of today in glitch.c o m, i even never experinced my bot before with this issue, it just does not work correctly in glitch at all, something is stopping it from playing music, and it has to due glitch.com nothing with my code or so, because i tested my code its perfect and fine, its only not working in glitch when ever running a song and the bot joins and leaves in 1 second.

Hi there - I think I just responded to your support ticket - make sure your .env keys and values are all correct.

2 Likes

they all are correct, i even added more and more information and proves that its not working, and i have no clue why, its nothing to do with my code i am sure 100% because my code is working perfect in visual studio and replit, and their is no problem with this part, but glitch is like blocking it from running or maybe discord is blocking glitch from joining the room, and i even never experinced before 1-6 months of using glitch like that.