kanbomodule.py 611 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. from event import Event
  3. import random
  4. try:
  5. from basemodule import BaseModule
  6. except ImportError:
  7. from modules.basemodule import BaseModule
  8. class KanboModule(BaseModule):
  9. def post_init(self):
  10. kanbo = Event("__.custom__")
  11. kanbo.define(msg_definition="^\.kanbo")
  12. kanbo.subscribe(self)
  13. self.bot.register_event(kanbo, self)
  14. self.messages = [u'( ͡° ͜ʖ ͡°)', u'( ͡0 ͜ʖ ͡0)', u'|╲/( ͡° ͡° ͜ʖ ͡° ͡°)/\╱\\', u'┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴']
  15. def handle(self, event):
  16. self.say(event.channel, random.choice(self.messages))