img search plugins ignoring svg and send gif as document
This commit is contained in:
parent
f498dfe32e
commit
632c513bf7
@ -35,10 +35,19 @@ function run(msg, matches)
|
|||||||
return "Kein Bild gefunden."
|
return "Kein Bild gefunden."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if string.ends(url, ".svg") then
|
||||||
|
return "Fehler beim laden des Bildes."
|
||||||
|
end
|
||||||
|
|
||||||
print("Bilder-URL: ", url)
|
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)
|
send_photo_from_url(receiver, url)
|
||||||
return "Source: "..url
|
return "Source: "..url
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
description = "Sucht Bild mit Google-API und versendet es [NSFW]",
|
description = "Sucht Bild mit Google-API und versendet es [NSFW]",
|
||||||
|
@ -35,10 +35,19 @@ function run(msg, matches)
|
|||||||
return "Kein Bild gefunden."
|
return "Kein Bild gefunden."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if string.ends(url, ".svg") then
|
||||||
|
return "Fehler beim laden des Bildes."
|
||||||
|
end
|
||||||
|
|
||||||
print("Bilder-URL: ", url)
|
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)
|
send_photo_from_url(receiver, url)
|
||||||
return "Source: "..url
|
return "Source: "..url
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
description = "Sucht Bild mit Google-API und versendet es (SafeSearch aktiv)",
|
description = "Sucht Bild mit Google-API und versendet es (SafeSearch aktiv)",
|
||||||
|
@ -35,10 +35,19 @@ function run(msg, matches)
|
|||||||
return "Kein Bild gefunden."
|
return "Kein Bild gefunden."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if string.ends(url, ".svg") then
|
||||||
|
return "Fehler beim laden des Bildes."
|
||||||
|
end
|
||||||
|
|
||||||
print("Bilder-URL: ", url)
|
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)
|
send_photo_from_url(receiver, url)
|
||||||
return "Source: "..url
|
return "Source: "..url
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
description = "Sucht Bild mit Google-API und versendet es [NSFW]",
|
description = "Sucht Bild mit Google-API und versendet es [NSFW]",
|
||||||
|
Reference in New Issue
Block a user