- Translate: Checkt, ob Bing-Key existiert
- Wiki: Bugfix, wenn keine Parameter angegeben
This commit is contained in:
		| @@ -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]+) (.+)", | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Andreas Bielawski
					Andreas Bielawski