pawel02 / music_bot

Music discord bot with all the functionality you'll ever want
67 stars 91 forks source link

Play function prevents playback #25

Open matthewjezek opened 1 year ago

matthewjezek commented 1 year ago

There's an issue which prevents bot from playing.

In play_music function there is a self.music_queue.pop(0) statement commented as

remove the first element as you are currently playing it

But if there is only one song in the queue, which is the first one added, the queue is empty after removing it from the queue, which causes the called play_next function not to run because it has an if statement that disables playback when the queue is empty. Thus, the music doesn't even start playing.

def play_next(self): if len(self.music_queue) > 0: