1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Don't check if we're connected when disconnecting

This commit is contained in:
Phxntxm 2017-05-08 17:19:01 -05:00
parent f0ce98e731
commit 812988f00d

View file

@ -303,6 +303,7 @@ class Music:
"voice activation`".format(channel.name))
return False
log.info("Connecting to {} in {}".format(channel.id, ctx.message.guild.id))
state = self.voice_states.get(ctx.message.guild.id)
try:
if state and state.voice and state.voice.channel:
@ -396,7 +397,7 @@ class Music:
state = self.voice_states.get(ctx.message.guild.id)
# Stop playing whatever song is playing.
if state and state.voice and state.voice.is_connected():
if state and state.voice:
state.voice.stop()
state.songs.clear()