Merge pull request #27 from TiagoDanin/Sending-img

Minor improvements when sending image
This commit is contained in:
Drew 2016-01-17 14:17:59 -05:00
commit f21116dfcf
2 changed files with 5 additions and 2 deletions

View File

@ -24,8 +24,9 @@ local action = function(msg)
end
str = str:match('<img src="(.*)">')
local output = '[]('..str..')'
sendMessage(msg.chat.id, str)
sendMessage(msg.chat.id, output, false, nil, true)
end

View File

@ -59,11 +59,13 @@ local action = function(msg)
local i = math.random(jdat.queries.request[1].count)
local result = jdat.items[i].link
local output = '[]('..result..')'
if string.match(msg.text, '^/i[mage]*nsfw') then
sendReply(msg, result)
else
sendMessage(msg.chat.id, result, false, msg.message_id)
sendMessage(msg.chat.id, output, false, nil, true)
end
end