From f56e2a41494675ba1411eefb6111a5e40e065fe1 Mon Sep 17 00:00:00 2001 From: Tiago Danin Date: Sun, 17 Jan 2016 15:39:00 -0300 Subject: [PATCH] Minor improvements when sending image --- plugins/cats.lua | 3 ++- plugins/gImages.lua | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/cats.lua b/plugins/cats.lua index d0b6fb8..5048a6a 100755 --- a/plugins/cats.lua +++ b/plugins/cats.lua @@ -24,8 +24,9 @@ local action = function(msg) end str = str:match('') + local output = '[​]('..str..')' - sendMessage(msg.chat.id, str) + sendMessage(msg.chat.id, output, false, nil, true) end diff --git a/plugins/gImages.lua b/plugins/gImages.lua index e1f98c2..79fb45d 100755 --- a/plugins/gImages.lua +++ b/plugins/gImages.lua @@ -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