Extract hooks

This commit is contained in:
nemunaire 2015-04-17 08:43:03 +02:00 committed by nemunaire
commit 002f2463a3
9 changed files with 104 additions and 76 deletions

View file

@ -23,8 +23,8 @@ def load(context):
else:
URL_TPBAPI = context.config.getNode("tpbapi")["url"]
from nemubot.hooks.messagehook import MessageHook
context.add_hook("cmd_hook", MessageHook(cmd_tpb, "tpb"))
from nemubot.hooks.message import Message
context.add_hook("cmd_hook", Message(cmd_tpb, "tpb"))
def cmd_tpb(msg):