translate.lua now enquotes translations.

echo.lua now enquotes echos in supergroups.
This commit is contained in:
topkecleon 2016-03-23 19:54:18 -04:00
parent 83bdeccdb1
commit 495cc8d0c1
2 changed files with 11 additions and 4 deletions

View File

@ -12,12 +12,19 @@ local action = function(msg)
local input = msg.text:input()
if input then
sendMessage(msg.chat.id, latcyr(input))
else
if not input then
sendMessage(msg.chat.id, doc, true, msg.message_id, true)
else
local output
if msg.chat.type == 'supergroup' then
output = 'Echo:\n"' .. input .. '"'
else
output = latcyr(input)
end
sendMessage(msg.chat.id, output, true)
end
end
return {

View File

@ -36,7 +36,7 @@ local action = function(msg)
end
local output = jdat.text[1]
output = latcyr(output)
output = 'Translation:\n"' .. output .. '"'
sendReply(msg.reply_to_message or msg, output)