Fix piece of modules/define.py._get_definition( that was accepting a word or an

event.
This commit is contained in:
jesopo 2018-09-30 10:27:50 +01:00
parent aa0c9ec9f1
commit 7ab8948101

View file

@ -12,8 +12,6 @@ class Module(ModuleManager.BaseModule):
_last_called = 0 _last_called = 0
def _get_definition(self, word): def _get_definition(self, word):
word = event["args"] if "args" in event else event
page = Utils.get_url(URL_WORDNIK % word, get_params={ page = Utils.get_url(URL_WORDNIK % word, get_params={
"useCanonical": "true", "limit": 1, "useCanonical": "true", "limit": 1,
"sourceDictionaries": "wiktionary", "api_key": self.bot.config[ "sourceDictionaries": "wiktionary", "api_key": self.bot.config[