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.
2014-11-04 22:39:14 +01:00
|
|
|
|
|
|
|
function run(msg, matches)
|
2014-11-04 23:06:26 +01:00
|
|
|
file = download_to_file(matches[1])
|
|
|
|
print("I will send the image " .. file)
|
|
|
|
send_photo(get_receiver(msg), file, ok_cb, false)
|
2014-11-04 22:39:14 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
2014-11-22 15:05:54 +01:00
|
|
|
description = "When user sends image URL (ends with png, jpg, jpeg) download and send it to origin.",
|
2014-11-04 22:39:14 +01:00
|
|
|
usage = "",
|
|
|
|
patterns = {
|
|
|
|
"(https?://[%w-_%.%?%.:/%+=&]+.png)$",
|
|
|
|
"(https?://[%w-_%.%?%.:/%+=&]+.jpg)$",
|
|
|
|
"(https?://[%w-_%.%?%.:/%+=&]+.jpeg)$",
|
|
|
|
},
|
|
|
|
run = run
|
|
|
|
}
|