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

24 lines
657 B
Lua
Raw Normal View History

2015-04-14 20:21:23 +02:00
function run(msg, matches)
randomValue = math.random(4)
2015-04-20 18:52:25 +02:00
if randomValue == 1 then
2015-04-14 20:21:23 +02:00
send_photo(get_receiver(msg), "pictures/cats/cat1.jpg", ok_cb, false)
2015-04-20 18:52:25 +02:00
elseif randomValue == 2 then
2015-04-14 20:21:23 +02:00
send_photo(get_receiver(msg), "pictures/cats/cat2.jpg", ok_cb, false)
2015-04-20 18:52:25 +02:00
elseif randomValue == 3 then
2015-04-14 20:21:23 +02:00
send_photo(get_receiver(msg), "pictures/cats/cat3.jpg", ok_cb, false)
2015-04-20 18:52:25 +02:00
elseif randomValue == 4 then
2015-04-14 20:21:23 +02:00
send_photo(get_receiver(msg), "pictures/cats/cat4.jpg", ok_cb, false)
2015-04-20 18:52:25 +02:00
end
2015-04-14 20:21:23 +02:00
end
return {
description = "Sendet eins von 4 Katzenbilder",
usage = "/kitty",
2015-04-23 17:30:10 +02:00
patterns = {"^/kitty",
"^/katze",
"^/cat",
"^/neko",
"^/kadse"},
2015-04-14 20:21:23 +02:00
run = run
2015-04-20 18:52:25 +02:00
}
--by Akamaru