This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
2015-11-12 17:42:03 +01:00
|
|
|
local function run(msg, matches)
|
|
|
|
local receiver = get_receiver(msg)
|
|
|
|
local url = matches[1]
|
|
|
|
if string.match(msg.text, "[Gg][Ee][Tt][Dd][Aa][Tt][Aa]") or string.match(msg.text, "[Ww][Gg][Ee][Tt]") then
|
|
|
|
send_document_from_url(receiver, url)
|
|
|
|
elseif string.match(msg.text, "[Gg][Ee][Tt][Ii][Mm][Gg]") then
|
|
|
|
send_photo_from_url(receiver, url)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
description = "Ein plugin, um Bilder oder Dateien zu downloaden",
|
2016-06-22 13:59:06 +02:00
|
|
|
usage = {"#getdata [URL]",
|
|
|
|
"#wget [URL]",
|
|
|
|
"#getimg [URL]"},
|
|
|
|
patterns = {"^#[Gg][Ee][Tt][Dd][Aa][Tt][Aa] (.*)$",
|
|
|
|
"#[Ww][Gg][Ee][Tt] (.*)$",
|
|
|
|
"^#[Gg][Ee][Tt][Ii][Mm][Gg] (.*)$"
|
2015-11-12 17:42:03 +01:00
|
|
|
},
|
|
|
|
run = run
|
|
|
|
}
|
|
|
|
--by Akamaru [https://ponywave.de]
|