img search plugins ignoring svg and send gif as document

This commit is contained in:
Akamaru 2015-06-24 02:32:35 +02:00
parent f498dfe32e
commit 632c513bf7
3 changed files with 28 additions and 1 deletions

View File

@ -34,10 +34,19 @@ function run(msg, matches)
if not url then
return "Kein Bild gefunden."
end
if string.ends(url, ".svg") then
return "Fehler beim laden des Bildes."
end
print("Bilder-URL: ", url)
if string.ends(url, ".gif") then
send_document_from_url(receiver, url)
return "Source: "..url
else
send_photo_from_url(receiver, url)
return "Source: "..url
return "Source: "..url
end
end
return {

View File

@ -34,10 +34,19 @@ function run(msg, matches)
if not url then
return "Kein Bild gefunden."
end
if string.ends(url, ".svg") then
return "Fehler beim laden des Bildes."
end
print("Bilder-URL: ", url)
if string.ends(url, ".gif") then
send_document_from_url(receiver, url)
return "Source: "..url
else
send_photo_from_url(receiver, url)
return "Source: "..url
end
end
return {

View File

@ -34,10 +34,19 @@ function run(msg, matches)
if not url then
return "Kein Bild gefunden."
end
if string.ends(url, ".svg") then
return "Fehler beim laden des Bildes."
end
print("Bilder-URL: ", url)
if string.ends(url, ".gif") then
send_document_from_url(receiver, url)
return "Source: "..url
else
send_photo_from_url(receiver, url)
return "Source: "..url
end
end
return {