23 lines
702 B
Lua
23 lines
702 B
Lua
|
|
||
|
function run(msg, matches)
|
||
|
file = download_to_file(matches[1])
|
||
|
send_document(get_receiver(msg), file, ok_cb, false)
|
||
|
end
|
||
|
|
||
|
return {
|
||
|
description = "from media URL downloads it and sends to origin",
|
||
|
usage = "",
|
||
|
patterns = {
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.gif)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.mp4)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.pdf)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.ogg)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.zip)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.mp3)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.rar)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.wmv)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.doc)$",
|
||
|
"(https?://[%w-_%.%?%.:/%+=&]+.avi)$"
|
||
|
},
|
||
|
run = run
|
||
|
}
|