New plugin "justkitten"

This commit is contained in:
Akamaru 2015-04-18 18:46:37 +02:00
parent 85437c8dc0
commit 5159c65794
8 changed files with 26 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
res/
data/
.luarocks
.db
.db
*.db

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

24
plugins/justkitten.lua Normal file
View File

@ -0,0 +1,24 @@
function run(msg, matches)
randomValue = math.random(6)
if randomValue == 1 then
send_photo(get_receiver(msg), "pictures/justkitten/justkitten1.jpg", ok_cb, false)
elseif randomValue == 2 then
send_photo(get_receiver(msg), "pictures/justkitten/justkitten2.jpg", ok_cb, false)
elseif randomValue == 3 then
send_photo(get_receiver(msg), "pictures/justkitten/justkitten3.jpg", ok_cb, false)
elseif randomValue == 4 then
send_photo(get_receiver(msg), "pictures/justkitten/justkitten4.jpg", ok_cb, false)
elseif randomValue == 5 then
send_photo(get_receiver(msg), "pictures/justkitten/justkitten5.jpg", ok_cb, false)
elseif randomValue == 6 then
send_photo(get_receiver(msg), "pictures/justkitten/justkitten6.jpg", ok_cb, false)
end
end
return {
description = "Sendet eins von 6 Just Kitten Bilder",
usage = "/jk",
patterns = {"^/jk"},
run = run
}