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

@ -28,8 +28,9 @@ def load(context):
else:
URL = URL % context.config.getNode("wrapi")["key"]
from nemubot.hooks.messagehook import MessageHook
context.add_hook("cmd_hook", MessageHook(cmd_translate, "translate"))
import nemubot.hooks
context.add_hook("cmd_hook",
nemubot.hooks.Message(cmd_translate, "translate"))
def help_full():