1
0
Fork 0
mirror of synced 2024-06-03 03:04:33 +12:00

Printing flag states for testing playlist error

This commit is contained in:
Phxntxm 2016-07-24 13:09:15 -05:00
parent 43a1025da0
commit 5f399bac82
2 changed files with 8 additions and 1 deletions

View file

@ -87,7 +87,7 @@ class Core:
@commands.command(pass_context=True)
@checks.customPermsOrRole("send_messages")
async def roll(self, ctx, notation: str="1d6"):
async def roll(self, ctx, notation: str="d6"):
"""Rolls a die based on the notation given
Format should be #d#"""
try:

View file

@ -48,14 +48,21 @@ class VoiceState:
self.player.stop()
def toggle_next(self):
f = open('/home/phxntx5/public_html/Bonfire/playlist_test','a')
print('Toggle command was detected, clearing flag',file=f)
f.close()
self.bot.loop.call_soon_threadsafe(self.play_next_song.set)
async def audio_player_task(self):
while True:
f = open('/home/phxntx5/public_html/Bonfire/playlist_test','a')
self.play_next_song.clear()
print('Flag was cleared, starting next song',file=f)
self.current = await self.songs.get()
await self.bot.send_message(self.current.channel, 'Now playing ' + str(self.current))
self.current.player.start()
print('Now awaiting for the flag to be cleared',file=f)
f.close()
await self.play_next_song.wait()