If a song is played, then disconnected, calling play with a new song does not reconnect the bot to the voice channel
See original GitHub issueI recently complied the bot, and found this issue when testing it with my friends. Removing the if statement on line 60 to just be
if (player.voiceConnection === null) {
await player.connect(targetVoiceChannel);
await player.play();
}
seemed to fix the problem but i do not know if this causes more issues
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Not connected to voice when moving bot to another ... - GitHub
Start a bot and have it play audio. Use a command to execute the move_to method or manually move the bot to another...
Read more >python - Bot joins and plays music but after disconnecting and ...
My bot works perfectly but every time I play a song in the first run and when I make it disconnect and connect...
Read more >Voice Connections | discord.js Guide
If it has, then it means that the bot has moved voice channels. Otherwise, we should treat it as a real disconnect and...
Read more >Commands | MusicBot - GitHub Pages
This is a list of the commands that can be used to control the MusicBot. ... !summon - Connects the bot to your...
Read more >Event Reference - Wavelink 1.0.0 documentation
Called when the current track has finished playing. ... VoiceChannel): voice_client = await channel.connect(cls=wavelink.Player). Warning. This class should ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think it becomes unusable, you just have to send two
.play
commands to get it working again.This should now be fixed, please try it out and let me know if you believe the behavior should be further modified.
(If you use the container image, wait for it to build and push before re-pulling.)