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

18 lines
389 B
Lua

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
end
local function run(msg)
local joke = chuck()
return unescape_html(joke)
end
return {
description = "Sendet Chuck Norris Witze (Englisch)",
usage = {"/cn"},
patterns = {"^/cn$"},
run = run
}