diff options
| author | 2018-09-27 11:46:10 +0100 | |
|---|---|---|
| committer | 2018-09-27 11:46:10 +0100 | |
| commit | 8b0314b190b02f7e83fe0dae3c349ce4dffdcb4f (patch) | |
| tree | 2481de34452598ff3d3ca579612a0fdc0dc0edc5 /modules/define.py | |
| parent | Implement @Utils.export, to denote an export on a module (diff) | |
| signature | ||
Use ModuleManager.BaseModule in more modules
Diffstat (limited to 'modules/define.py')
| -rw-r--r-- | modules/define.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/define.py b/modules/define.py index 178a9c5a..57b3a762 100644 --- a/modules/define.py +++ b/modules/define.py @@ -1,17 +1,15 @@ #--require-config wordnik-api-key import time -from src import Utils +from src import ModuleManager, Utils URL_WORDNIK = "https://api.wordnik.com/v4/word.json/%s/definitions" URL_WORDNIK_RANDOM = "https://api.wordnik.com/v4/words.json/randomWord" RANDOM_DELAY_SECONDS = 3 -class Module(object): - def __init__(self, bot, events, exports): - self.bot = bot - self._last_called = 0 +class Module(ModuleManager.BaseModule): + _last_called = 0 def _get_definition(self, word): word = event["args"] if "args" in event else event |
