New plugin wat

This commit is contained in:
Akamaru 2015-04-30 16:04:22 +02:00
parent 811834a544
commit 2d03b0d72d
8 changed files with 26 additions and 0 deletions

BIN
pictures/wat/wat1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
pictures/wat/wat2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
pictures/wat/wat3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
pictures/wat/wat4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
pictures/wat/wat5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
pictures/wat/wat6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
pictures/wat/wat7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

26
plugins/wat.lua Normal file
View File

@ -0,0 +1,26 @@
function run(msg, matches)
randomValue = math.random(7)
if randomValue == 1 then
send_photo(get_receiver(msg), "pictures/wat/wat1.jpg", ok_cb, false)
elseif randomValue == 2 then
send_photo(get_receiver(msg), "pictures/wat/wat2.jpg", ok_cb, false)
elseif randomValue == 3 then
send_photo(get_receiver(msg), "pictures/wat/wat3.jpg", ok_cb, false)
elseif randomValue == 4 then
send_photo(get_receiver(msg), "pictures/wat/wat4.jpg", ok_cb, false)
elseif randomValue == 5 then
send_photo(get_receiver(msg), "pictures/wat/wat5.jpg", ok_cb, false)
elseif randomValue == 6 then
send_photo(get_receiver(msg), "pictures/wat/wat6.jpg", ok_cb, false)
elseif randomValue == 7 then
send_photo(get_receiver(msg), "pictures/wat/wat7.jpg", ok_cb, false)
end
end
return {
description = "Sendet eins von 6 WAT Bilder",
usage = {"/wat","/Wat","/WAT"},
patterns = {"^/wat","^/Wat","^/WAT"},
run = run
}
--by Akamaru