dance.py 603 B

123456789101112131415161718192021
  1. class Dance:
  2. def __init__(self, events=None, printer_handle=None, bot=None, say=None):
  3. self.events = events
  4. self.printer = printer_handle
  5. self.interests = ['__.dance__']
  6. self.bot = bot
  7. self.help = ".dance"
  8. for event in events:
  9. if event._type in self.interests:
  10. event.subscribe(self)
  11. def handle(self, event):
  12. try:
  13. self.printer("PRIVMSG " + event.channel + " : :D-\-< " + '\n')
  14. self.printer("PRIVMSG " + event.channel + " : :D-|-< " + '\n')
  15. self.printer("PRIVMSG " + event.channel + " : :D-/-< " + '\n')
  16. except TypeError:
  17. pass