diff options
| author | 2018-09-30 17:29:09 +0100 | |
|---|---|---|
| committer | 2018-09-30 17:29:09 +0100 | |
| commit | 10ef985a8a849a6bbfa8cbb63c2548e42ffb3957 (patch) | |
| tree | 4da29ff0462ca69820d81aa95afb4b261ab3213c /modules/translate.py | |
| parent | received.command takes a final [command] part (diff) | |
| signature | ||
Switch to using docstring for usage, permission and require_mode
Diffstat (limited to 'modules/translate.py')
| -rw-r--r-- | modules/translate.py | 6 |
1 files changed, 4 insertions, 2 deletions
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: |
