- Translate: Checkt, ob Bing-Key existiert

- Wiki: Bugfix, wenn keine Parameter angegeben
This commit is contained in:
Andreas Bielawski 2016-07-28 12:54:24 +02:00
parent f651c642ea
commit 1d7901855e
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,11 @@ require("./otouto/plugins/pasteee")
translate.command = 'translate [Text]'
function translate:init(config)
if not cred_data.bing_key then
print('Missing config value: bing_key.')
print('translate.lua will not be enabled.')
return
end
translate.triggers = {
"^/translate ([%w]+),([%a]+) (.+)",
"^/translate (to%:)([%w]+) (.+)",

View File

@ -209,7 +209,7 @@ function wikipedia:action(msg, config, matches)
lang = nil
end
if term == "" then
utilities.send_reply(msg, self, wikipedia.doc)
utilities.send_reply(self, msg, wikipedia.doc)
return
end