Add a test for subscribers

This commit is contained in:
Robert Miles 2018-12-01 01:01:29 -05:00
parent fe91b165c5
commit 32cd721129
1 changed files with 5 additions and 0 deletions

5
bot.py
View File

@ -47,6 +47,11 @@ class RadioBot(teambot.Handler):
if self.event.source.userhost=="khuxkm@oper.tilde.chat" and cmd=="down":
self.tasks.stop()
self._bot.die("Stopping...")
elif self.event.source.userhost=="khuxkm@oper.tilde.chat" and cmd=="test":
notify = [self.channels[0]]
notify.extend(self.subscribers)
for channel in notify:
self.say(channel,"'tis but a test. ignore me")
elif cmd=="dj":
if self.task_state["dj_live"]:
self.say(channel,nick+": {} is the current dj!".format(self.task_state["dj"]))