A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.py 388 B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. import random
  3. from classes import BaseCommand
  4. class Command(BaseCommand):
  5. """Test the bot!"""
  6. name = "test"
  7. def process(self, data):
  8. hey = random.randint(0, 1)
  9. if hey:
  10. self.connection.say(data.chan, "Hey \x02%s\x0F!" % data.nick)
  11. else:
  12. self.connection.say(data.chan, "'sup \x02%s\x0F?" % data.nick)