Extract hooks
This commit is contained in:
parent
c8d495d508
commit
002f2463a3
9 changed files with 104 additions and 76 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue