From 376825ea96099efc0f5e890370a417db1902df1a Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 10 Oct 2018 10:42:41 +0100 Subject: Mark command hooks that are aliases ('g' vs 'google') --- modules/translate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/translate.py') diff --git a/modules/translate.py b/modules/translate.py index 8570ae76..3a8e5b91 100644 --- a/modules/translate.py +++ b/modules/translate.py @@ -6,7 +6,8 @@ URL_LANGUAGES = "https://cloud.google.com/translate/docs/languages" REGEX_LANGUAGES = re.compile("(\w+)?:(\w+)? ") class Module(ModuleManager.BaseModule): - @utils.hook("received.command.translate|tr") + @utils.hook("received.command.tr", alias_of="translate") + @utils.hook("received.command.translate") def translate(self, event): """ :help: Translate the provided phrase or the last line in thie current -- cgit v1.3.1-10-gc9f91