aboutsummaryrefslogtreecommitdiff
path: root/modules/translate.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-10 10:42:41 +0100
committerGravatar jesopo2018-10-10 10:42:41 +0100
commit376825ea96099efc0f5e890370a417db1902df1a (patch)
tree456f70d784e9b63cbc70b167380d95000d5e4030 /modules/translate.py
parentRemove debug print in src.utils.http (diff)
signature
Mark command hooks that are aliases ('g' vs 'google')
Diffstat (limited to 'modules/translate.py')
-rw-r--r--modules/translate.py3
1 files changed, 2 insertions, 1 deletions
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