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.

1234567891011121314151617181920
  1. # -*- coding: utf-8 -*-
  2. """Test the bot!"""
  3. import random
  4. actions, data = None, None
  5. def call(a, d):
  6. global actions, data
  7. actions, data = a, d
  8. choices = ("say_hi()", "say_sup()")
  9. exec random.choice(choices)
  10. def say_hi():
  11. actions.say(data.chan, "Hey \x02%s\x0F!" % data.nick)
  12. def say_sup():
  13. actions.say(data.chan, "'sup \x02%s\x0F?" % data.nick)