Created
March 13, 2016 12:44
-
-
Save appendhc/5fed07f38cc4cd628a3c to your computer and use it in GitHub Desktop.
free google translate api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
local function run(msg, matches) | |
if not matches[3] then | |
t = http.request("http://lsdbot.noip.me/tr/?key=free-api&from=auto&to=en&text="..URL.escape(matches[2])) | |
return t | |
else | |
t = http.request("http://lsdbot.noip.me/tr/?key=free-api&from=auto&to="..matches[2].."&text="..URL.escape(matches[3])) | |
return t | |
end | |
end | |
return {patterns = {"^[#!/](tr) (.*) (.+)$","^[#!/](tr) (.+)$",}, run = run} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment