- Translate: Checkt, ob Bing-Key existiert
- Wiki: Bugfix, wenn keine Parameter angegeben
This commit is contained in:
parent
f651c642ea
commit
1d7901855e
@ -10,6 +10,11 @@ require("./otouto/plugins/pasteee")
|
|||||||
translate.command = 'translate [Text]'
|
translate.command = 'translate [Text]'
|
||||||
|
|
||||||
function translate:init(config)
|
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.triggers = {
|
||||||
"^/translate ([%w]+),([%a]+) (.+)",
|
"^/translate ([%w]+),([%a]+) (.+)",
|
||||||
"^/translate (to%:)([%w]+) (.+)",
|
"^/translate (to%:)([%w]+) (.+)",
|
||||||
|
@ -209,7 +209,7 @@ function wikipedia:action(msg, config, matches)
|
|||||||
lang = nil
|
lang = nil
|
||||||
end
|
end
|
||||||
if term == "" then
|
if term == "" then
|
||||||
utilities.send_reply(msg, self, wikipedia.doc)
|
utilities.send_reply(self, msg, wikipedia.doc)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user