Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ch
- class TestBot(ch.RoomManager):
- def onConnect(self, room):
- print("Connected")
- def onReconnect(self, room):
- print("Reconnected")
- def onDisconnect(self, room):
- print("Disconnected")
- def onMessage(self, room, user, message):
- print(user.name+":"+message.body)
- if message.body.startswith("Hey"):
- room.message("What are you about to annoy me with . . .")
- if message.body.startswith("hi"):
- room.message(". . What is it?")
- if message.body.startswith("Hi"):
- room.message("No, not more.")
- if message.body.startswith("Rawr!"):
- room.message("You Dare Growl at me?")
- if message.body.startswith("Hey."):
- room.message("Jauna.")
- if message.body.startswith("hey"):
- room.message("What now?")
- if message.body.startswith("whats up"):
- room.message("Teach yourself proper spelling before you get the nerve to speak to me.")
- if message.body.startswith("What's up"):
- room.message("The sky, or a ceiling. Whichever fits.")
- if message.body.startswith("Luna"):
- room.message("Use my full name please.")
- if message.body.startswith("Luna."):
- room.message("Only Astah or Vyolette may call me that.")
- if message.body.startswith("luna"):
- room.message("Names start with capital letters. Thank you.")
- if message.body.startswith("Lunarix."):
- room.message("What is it you wish for?")
- if message.body.startswith("Lunarix"):
- room.message("What do you ask of me?")
- if message.body.startswith("lol"):
- room.message("I bet you're not actually 'Laughing Out Loud'.")
- if message.body.startswith("Lol"):
- room.message("'Laughing Out Loud'? You're not really.")
- def onFloodWarning(self, room):
- room.reconnect()
- def onPMMessage(self, pm, user, body):
- pm.message(user, body) # echo
- if __name__ == "__main__":
- TestBot.easy_start()
Advertisement
Add Comment
Please, Sign In to add comment