musicpack / mbox

Music Box is a music player widget in a Discord message.
7 stars 2 forks source link

Moving the bot breaks reactions and playing the song #72

Open borisliao opened 3 years ago

borisliao commented 3 years ago

Describe the bug When you move the bot when it just joined the channel, it might connect but the bot might not be able to play the song. In this instance the buttons get registered and the bot is in the voice channel, but the song did not get played.

To Reproduce Steps to reproduce the behavior:

  1. Play a song
  2. Immedietly when the bot joins the voice channel, move the bot to another voice channel
  3. Check command_channel to see that the player embed did not update.
  4. See error

Expected behavior The bot recovers from this sudden move.

Additional context

[ERROR] Task exception was never retrieved future: <Task finished name='Task-144' coro=<Reaction.register..refresh() done, defined at ...\src\commander\element\Reaction.py:39> exception=AttributeError("'NoneType' object has no attribute 'volume'")> Traceback (most recent call last): File ...\src\commander\element\Reaction.py", line 59, in refresh await res File "...\src\music\player.py", line 121, in raise_volume self.connected_client.source.volume = self.volume/100 AttributeError: 'NoneType' object has no attribute 'volume'

borisliao commented 3 years ago

Reactions will be removed.

borisliao commented 3 years ago

After more investigation, this is a library error.

borisliao commented 3 years ago

Forcing the bot to disconnect might solve this issue