dont use "|" multi-event syntax. it's weird

This commit is contained in:
jesopo 2019-06-26 10:59:03 +01:00
parent 2e41f93c4d
commit 6667f49ee3
2 changed files with 4 additions and 2 deletions

View file

@ -40,7 +40,8 @@ def _command_method_validate(s):
"help": "Disable/enable responding to prefixed commands in-channel",
"validate": utils.bool_or_none, "example": "on"})
class Module(ModuleManager.BaseModule):
@utils.hook("new.user|channel")
@utils.hook("new.user")
@utils.hook("new.channel")
def new(self, event):
if "user" in event:
target = event["user"]

View file

@ -6,7 +6,8 @@ from src import ModuleManager, utils
URL_THESAURUS = "http://words.bighugelabs.com/api/2/%s/%s/json"
class Module(ModuleManager.BaseModule):
@utils.hook("received.command.synonym|antonym", min_args=1)
@utils.hook("received.command.synonym", min_args=1)
@utils.hook("received.command.antonym", min_args=1)
def thesaurus(self, event):
"""
:help: Get synonyms/antonyms for a provided phrase