Fix condition in task

This commit is contained in:
Robert Miles 2018-12-01 00:29:16 -05:00
parent df35d00b5d
commit 2ef450da5d
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -21,7 +21,7 @@ class RadioBot(teambot.Handler):
if resp["dj"] is None and state.get("dj_live",True):
state["dj_live"]=False
if resp["song"]!=state.get("song") or resp["listeners"]!=state.get("listeners"):
bot.say(bot.channels[0],"now playing: {} ({!s} listeners{})".format(resp["song"],resp["listeners"],(", played by "+resp["dj"] if resp["dj"] is not None else "")))
bot.say(bot.channels[0],"now playing: {} ({!s} listeners{})".format(resp["song"],resp["listeners"],(", played by "+resp["dj"] if resp["dj_live"] else "")))
state["song"]=resp["song"]
state["listeners"]=resp["listeners"]
basestate["handler"].task_state = state