aboutsummaryrefslogtreecommitdiff
path: root/modules/translate.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 10:50:37 +0100
committerGravatar dngfx2018-08-31 10:50:37 +0100
commitabed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch)
tree3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/translate.py
parentFix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff)
signature
Reformat
Diffstat (limited to 'modules/translate.py')
-rw-r--r--modules/translate.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/translate.py b/modules/translate.py
index a4b72785..414b5e6f 100644
--- a/modules/translate.py
+++ b/modules/translate.py
@@ -5,11 +5,12 @@ URL_TRANSLATE = "http://translate.googleapis.com/translate_a/single"
URL_LANGUAGES = "https://cloud.google.com/translate/docs/languages"
REGEX_LANGUAGES = re.compile("(\w+)?:(\w+)? ")
+
class Module(object):
def __init__(self, bot):
bot.events.on("received").on("command").on("translate", "tr").hook(
self.translate, help="Translate the provided phrase or the "
- "last line seen.", usage="[phrase]")
+ "last line seen.", usage="[phrase]")
def translate(self, event):
phrase = event["args"]
@@ -46,5 +47,4 @@ class Module(object):
data_json[0][0][0]))
else:
event["stderr"].write("Failed to translate, try checking "
- "source/target languages (" + URL_LANGUAGES + ")")
-
+ "source/target languages (" + URL_LANGUAGES + ")")