From fcbb7c960ce8c9b693711b4b40d3fa86fd17d7cf Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 19 Sep 2018 13:25:12 +0100 Subject: Refactor everything to use delimited events --- modules/thesaurus.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/thesaurus.py') diff --git a/modules/thesaurus.py b/modules/thesaurus.py index 25e53427..e0f5f009 100644 --- a/modules/thesaurus.py +++ b/modules/thesaurus.py @@ -7,10 +7,9 @@ URL_THESAURUS = "http://words.bighugelabs.com/api/2/%s/%s/json" class Module(object): def __init__(self, bot, events, exports): self.bot = bot - events.on("received").on("command").on("synonym", - "antonym").hook(self.thesaurus, min_args=1, - help="Get synonyms/antonyms for a provided phrase", - usage=" [type]") + events.on("received.command").on("synonym", "antonym").hook( + self.thesaurus, min_args=1, usage=" [type]", + help="Get synonyms/antonyms for a provided phrase") def thesaurus(self, event): phrase = event["args_split"][0] -- cgit v1.3.1-10-gc9f91