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

20 lines
658 B
Lua
Raw Normal View History

2015-06-11 16:16:35 +02:00
local function run(msg, matches)
local receiver = get_receiver(msg)
local url = 'http://thecatapi.com/api/images/get'
2015-06-11 16:49:29 +02:00
local gif_url = 'http://thecatapi.com/api/images/get?type=gif'
if matches[1] == "gif" then
print("GIF URL: "..gif_url)
send_document_from_url(receiver, gif_url)
else
print("Bild URL: "..url)
2015-06-11 16:16:35 +02:00
send_photo_from_url(receiver, url)
2015-06-11 16:49:29 +02:00
end
2015-04-14 20:21:23 +02:00
end
return {
2015-06-11 16:16:35 +02:00
description = "Sendet ein zufälliges Katzenbild",
usage = {"#kitty","#katze","#cat","#neko","#kadse"},
patterns = {"^#kitty$","^#katze$","^#cat$","^#kadse$","^#kitty (.*)$","^#katze (.*)$","^#cat (.*)$","^#kadse (.*)$",},
2015-04-14 20:21:23 +02:00
run = run
2015-04-20 18:52:25 +02:00
}
2015-05-22 17:01:33 +02:00
--by Akamaru [https://ponywave.de]