Skip to content

Commit

Permalink
don't await for get_next_song
Browse files Browse the repository at this point in the history
  • Loading branch information
Raas Ahsan committed Jan 22, 2019
1 parent 91fe4a8 commit 4eb3ac3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apophis/cmds/music.py
Expand Up @@ -73,7 +73,7 @@ async def after_song(old_context, message):
}

await stop_playing(new_context)
next_song_id = await get_next_song()
next_song_id = get_next_song()
if next_song_id is None:
pass
else:
Expand All @@ -87,7 +87,7 @@ async def stop_playing(context) -> None:
voice.stop()


async def get_next_song() -> Optional[int]:
def get_next_song() -> Optional[int]:
try:
return song_queue.get_nowait()
except QueueEmpty:
Expand Down Expand Up @@ -214,7 +214,7 @@ async def handle(self, context, message):
return await message.add_reaction('\u2705')
elif content[0].startswith('next'):
await stop_playing(context)
next_song_id = await get_next_song()
next_song_id = get_next_song()
if next_song_id is None:
return message.channel.send('No more songs in queue.')
else:
Expand Down

0 comments on commit 4eb3ac3

Please sign in to comment.