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

@ -1,9 +1,13 @@
local function run(msg, matches)
local receiver = get_receiver(msg)
local url = 'http://i.gifeye.com/'..matches[1]..'.gif'
print("GIF URL: "..url)
print("GIF URL: "..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]
else
return
end
end
return {