Refactors hooks registration
This commit is contained in:
parent
49d7e4ced6
commit
f39a0eac56
40 changed files with 202 additions and 168 deletions
|
|
@ -103,7 +103,7 @@ class DDGResult:
|
|||
|
||||
# MODULE INTERFACE ####################################################
|
||||
|
||||
@hook("cmd_hook", "define")
|
||||
@hook.command("define")
|
||||
def define(msg):
|
||||
if not len(msg.args):
|
||||
raise IMException("Indicate a term to define")
|
||||
|
|
@ -115,7 +115,7 @@ def define(msg):
|
|||
|
||||
return Response(s.definition, channel=msg.channel)
|
||||
|
||||
@hook("cmd_hook", "search")
|
||||
@hook.command("search")
|
||||
def search(msg):
|
||||
if not len(msg.args):
|
||||
raise IMException("Indicate a term to search")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue