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/chucknorris.lua

22 lines
404 B
Lua
Raw Normal View History

2016-07-07 21:34:32 +02:00
do
local function chuck()
local random = http.request("http://api.icndb.com/jokes/random")
local decode = json:decode(random)
local joke = decode.value.joke
return joke
2015-04-19 21:18:06 +02:00
end
local function run(msg)
local joke = chuck()
return unescape_html(joke)
2015-04-19 21:18:06 +02:00
end
return {
2015-04-20 18:52:25 +02:00
description = "Sendet Chuck Norris Witze (Englisch)",
usage = {"#cn"},
2016-07-07 21:34:32 +02:00
patterns = {"^#[Cc][Nn]$"},
2015-04-19 21:18:06 +02:00
run = run
2016-07-07 21:34:32 +02:00
}
end