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.
Mikubot-2/otouto/plugins/speedtest.lua
Andreas Bielawski 2118a844d9 - Restrukturierung: "require" wird nun nicht mehr in jedem Plugin benötigt
- Echo: Korrekte Ausgabe in Supergruppen
2016-07-31 21:29:44 +02:00

15 lines
424 B
Lua

local speedtest = {}
speedtest.triggers = {
"speedtest.net/my%-result/(%d+)",
"speedtest.net/my%-result/i/(%d+)"
}
function speedtest:action(msg, config, matches)
local url = 'http://www.speedtest.net/result/'..matches[1]..'.png'
utilities.send_typing(self, msg.chat.id, 'upload_photo')
local file = download_to_file(url)
utilities.send_photo(self, msg.chat.id, file, nil, msg.message_id)
end
return speedtest