From 1a98fb1a15ecaba7a1c7df4979e176f1c63fc48e Mon Sep 17 00:00:00 2001 From: Akamaru Date: Fri, 21 Jul 2017 21:41:14 +0200 Subject: [PATCH] WebShot: Kein Cache von Bildern --- miku/plugins/webshot.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miku/plugins/webshot.lua b/miku/plugins/webshot.lua index 4aabbb7..8a72cae 100644 --- a/miku/plugins/webshot.lua +++ b/miku/plugins/webshot.lua @@ -14,9 +14,10 @@ function webshot:action(msg, config, matches) local cache = '0' --cache=0 : never use cache, always download fresh screenshot || cache=1 : use image from cache only if is not older than 1 day etc... local url = matches[1] local img_url = 'http://api.screenshotmachine.com/?key='..api_key..'&dimension=1024x768&cacheLimit='..cache..'&url='..url + local file = download_to_file(img_url, 'scrot.jpg') utilities.send_typing(msg.chat.id, 'upload_photo') - utilities.send_photo(msg.chat.id, img_url, nil, msg.message_id) + utilities.send_photo(msg.chat.id, file, nil, msg.message_id) end return webshot \ No newline at end of file