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,11 +12,18 @@ local action = function(msg)
local input = msg.text:input() local input = msg.text:input()
if input then if not input then
sendMessage(msg.chat.id, latcyr(input))
else
sendMessage(msg.chat.id, doc, true, msg.message_id, true) 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 end
sendMessage(msg.chat.id, output, true)
end
end end

View File

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