diff options
| author | 2018-08-31 12:55:52 +0100 | |
|---|---|---|
| committer | 2018-08-31 13:44:39 +0100 | |
| commit | b7cf524e9869828ff85954cb731f7fee98bee8d9 (patch) | |
| tree | d5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/thesaurus.py | |
| parent | Revert "Reformat" (diff) | |
| signature | ||
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/thesaurus.py')
| -rw-r--r-- | modules/thesaurus.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/thesaurus.py b/modules/thesaurus.py index 2580c191..6f91cec4 100644 --- a/modules/thesaurus.py +++ b/modules/thesaurus.py @@ -5,9 +5,9 @@ import Utils URL_THESAURUS = "http://words.bighugelabs.com/api/2/%s/%s/json" class Module(object): - def __init__(self, bot): + def __init__(self, bot, events): self.bot = bot - bot.events.on("received").on("command").on("synonym", + events.on("received").on("command").on("synonym", "antonym").hook(self.thesaurus, min_args=1, help="Get synonyms/antonyms for a provided phrase", usage="<word> [type]") |
