From 7c401955433288804857d7346c6e2691c288b85d Mon Sep 17 00:00:00 2001 From: khuxkm fbexl Date: Sat, 1 Dec 2018 00:42:56 -0500 Subject: [PATCH] Fix np and add joke commands --- bot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index cfb10c7..1c316fb 100644 --- a/bot.py +++ b/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")