pyircbot/examples/data/modules/EchoExample.py

17 lines
511 B
Python
Raw Normal View History

2015-08-08 16:50:26 -07:00
from pyircbot.modulebase import ModuleBase,ModuleHook
class EchoExample(ModuleBase):
def __init__(self, bot, moduleName):
ModuleBase.__init__(self, bot, moduleName)
self.loadConfig()
print(self.config)
self.hooks=[ModuleHook("PRIVMSG", self.echo)]
2015-08-08 22:50:04 -07:00
def echo(self, event):
print(event)
print(repr(event))
print(dir(event))
self.bot.act_PRIVMSG(event.args[0], event.trailing)
2015-08-08 16:50:26 -07:00
def ondisable(self):
print("I'm getting unloaded!")