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("If this exactly is sent"):
- room.message("This is what is said")
- def onFloodWarning(self, room):
- room.reconnect()
- def onPMMessage(self, pm, user, body):
- pm.message(user, body) # Notes, I should put something legit here.
- if __name__ == "__main__":
- TestBot.easy_start(name = None, password = None, pm = True)
Advertisement
Add Comment
Please, Sign In to add comment