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/plugins/fortunes_uc3m.lua

24 lines
378 B
Lua

do
function get_fortunes_uc3m()
local i = math.random(0,178) -- max 178
local web = "http://www.gul.es/fortunes/f"..i
local b, c, h = http.request(web)
return b
end
function run(msg, matches)
return get_fortunes_uc3m()
end
return {
description = "Fortunes from Universidad Carlos III",
usage = "!uc3m",
patterns = {
"^!uc3m$"
},
run = run
}
end