Fix np and add joke commands
This commit is contained in:
parent
2ef450da5d
commit
7c40195543
7
bot.py
7
bot.py
|
@ -27,6 +27,7 @@ class RadioBot(teambot.Handler):
|
|||
basestate["handler"].task_state = state
|
||||
return state
|
||||
def on_pubmsg(self,channel,nick,text):
|
||||
print(self.event.source.userhost)
|
||||
if text.startswith(self._bot.bot_nick+": "):
|
||||
cmd = text[len(self._bot.bot_nick+": "):].strip()
|
||||
if self.event.source.userhost=="khuxkm@oper.tilde.chat" and cmd=="down":
|
||||
|
@ -37,8 +38,12 @@ class RadioBot(teambot.Handler):
|
|||
self.say(channel,nick+": {} is the current dj!".format(self.task_state["dj"]))
|
||||
else:
|
||||
self.say(channel,nick+": nobody is live right now.")
|
||||
elif cmd=="nowplaying":
|
||||
elif cmd=="np":
|
||||
self.say(channel,nick+": now playing: {} ({!s} listeners{})".format(self.task_state["song"],self.task_state["listeners"],(", played by "+self.task_state["dj"] if self.task_state["dj_live"] else "")))
|
||||
elif cmd=="radio": # joke command
|
||||
self.say(channel,"eat the poop or die!!1")
|
||||
elif cmd=="paymybills": # joke command
|
||||
self.say(channel,"whaddya mean?! i'm broker than you!")
|
||||
elif text.strip()=="!botlist":
|
||||
self.say(channel,"Maintainer: khuxkm@tilde.team | your friendly neighborhood radio bot | https://tildegit.org/khuxkm/radiobot")
|
||||
|
||||
|
|
Loading…
Reference in New Issue