From 10ef985a8a849a6bbfa8cbb63c2548e42ffb3957 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 30 Sep 2018 17:29:09 +0100 Subject: Switch to using docstring for usage, permission and require_mode --- modules/translate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/translate.py') diff --git a/modules/translate.py b/modules/translate.py index 2b118140..b96a49a1 100644 --- a/modules/translate.py +++ b/modules/translate.py @@ -6,10 +6,12 @@ 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", usage="[phrase]") + @Utils.hook("received.command.translate|tr") def translate(self, event): """ - Translate the provided phrase or the last line in thie current channel + :help: Translate the provided phrase or the last line in thie current + channel + :usage: [phrase] """ phrase = event["args"] if not phrase: -- cgit v1.3.1-10-gc9f91