From 85d8ad1fe01fbcd856bac9270294cbba451bd672 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 29 Dec 2019 07:27:37 +0000 Subject: [PATCH] correctly deal with "define previous message" --- modules/define.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/define.py b/modules/define.py index 4e83c65c..6bc37774 100644 --- a/modules/define.py +++ b/modules/define.py @@ -36,6 +36,11 @@ class Module(ModuleManager.BaseModule): word = event["args"] else: 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(" ", "+") success, definition = self._get_definition(word)