correctly deal with "define previous message"
This commit is contained in:
parent
069b0a9dab
commit
85d8ad1fe0
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
word = event["args"]
|
word = event["args"]
|
||||||
else:
|
else:
|
||||||
word = event["target"].buffer.get(from_self=False)
|
word = event["target"].buffer.get(from_self=False)
|
||||||
|
if word:
|
||||||
|
word = word.message
|
||||||
|
|
||||||
|
if not word:
|
||||||
|
raise utils.EventError("No phrase provided")
|
||||||
word = word.replace(" ", "+")
|
word = word.replace(" ", "+")
|
||||||
|
|
||||||
success, definition = self._get_definition(word)
|
success, definition = self._get_definition(word)
|
||||||
|
|
Loading…
Reference in a new issue