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

Change how to check for pause/resume errors

This commit is contained in:
phxntxm 2017-05-05 23:58:05 -05:00
parent bfb744bb29
commit 24a7a64b07

View file

@ -368,7 +368,7 @@ class Music:
async def pause(self, ctx):
"""Pauses the currently played song."""
state = self.voice_states.get(ctx.message.guild.id)
if state and state.playing:
if state and state.voice and state.voice.is_connected():
state.voice.pause()
@commands.command(pass_context=True)
@ -377,7 +377,7 @@ class Music:
async def resume(self, ctx):
"""Resumes the currently played song."""
state = self.voice_states.get(ctx.message.guild.id)
if state and state.voice.is_connected():
if state and state.voice and state.voice.is_connected():
state.voice.resume()
@commands.command(pass_context=True)