return source only by command

This commit is contained in:
Akamaru 2015-07-22 17:43:38 +02:00
parent b25fa0fe70
commit 18cb50f0a8

View File

@ -3,7 +3,11 @@ local function run(msg, matches)
local url = 'http://i.gifeye.com/'..matches[1]..'.gif' local url = 'http://i.gifeye.com/'..matches[1]..'.gif'
print("GIF URL: "..url) print("GIF URL: "..url)
send_document_from_url(receiver, url) send_document_from_url(receiver, url)
if string.starts(msg.text, '/ge') or string.starts(msg.text, '/gifeye') then
return 'Source: http://gifeye.com/'..matches[1] return 'Source: http://gifeye.com/'..matches[1]
else
return
end
end end
return { return {