9gag deletes img after sended

This commit is contained in:
Akamaru 2015-04-16 20:14:36 +02:00
parent 848c9d6781
commit 5bf2b6bf17
3 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@ local function run(msg, matches)
local receiver = get_receiver(msg)
local url, title = get_9GAG()
local file_path = download_to_file(url)
_send_photo(receiver, file_path, send_title, {receiver, title})
send_photo_from_url(receiver, url, send_title, {receiver, title})
return false
end

View File

@ -1,3 +1,4 @@
do
function getGoogleImage(text)
@ -37,6 +38,7 @@ function run(msg, matches)
print("Bilder-URL: ", url)
send_photo_from_url(receiver, url)
return "Source:"..url
end
return {
@ -45,5 +47,4 @@ return {
patterns = {"^/img (.*)$"},
run = run
}
end

View File

@ -37,6 +37,7 @@ function run(msg, matches)
print("Bilder-URL: ", url)
send_photo_from_url(receiver, url)
return "Source: "..url
end
return {