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

22 lines
452 B
Lua
Raw Normal View History

2016-07-07 21:34:32 +02:00
do
2015-05-28 16:47:30 +02:00
function run(msg, matches)
2016-07-07 21:34:32 +02:00
local cow = matches[1]
2015-05-28 16:47:30 +02:00
local receiver = get_receiver(msg)
2016-07-07 21:34:32 +02:00
if string.match(cow, '"') then
return 'Vergiss es!'
else
2015-05-28 16:47:30 +02:00
local text = run_bash('cowsay "' .. cow .. '"')
send_msg(receiver, text, ok_cb, false)
end
2015-05-28 16:47:30 +02:00
end
return {
2016-07-07 21:34:32 +02:00
description = "Die sprechende Kuh!",
usage = {"#cowsay [Text]"},
patterns = {"^#[Cc][Oo][Ww][Ss][Aa][Yy] (.*)$"},
2015-05-28 16:47:30 +02:00
run = run
}
2016-07-07 21:34:32 +02:00
--by Akamaru [https://ponywave.de]
end