23 lines
638 B
Lua
23 lines
638 B
Lua
-- Requires: (sudo) npm install -g flip-text
|
|
function run(msg, matches)
|
|
text = matches[1]
|
|
local receiver = get_receiver(msg)
|
|
if string.match(msg.text, '"') then
|
|
return 'Vergiss es'
|
|
elseif string.match(msg.text, '/flip') then
|
|
local text = run_bash('flip "' .. text .. '"')
|
|
send_msg(receiver, text, ok_cb, false)
|
|
elseif string.match(msg.text, '/rev') then
|
|
local text = run_bash('echo "' .. text .. '" | rev')
|
|
send_msg(receiver, text, ok_cb, false)
|
|
end
|
|
end
|
|
|
|
return {
|
|
description = "",
|
|
usage = {""},
|
|
patterns = {"^/flip (.*)$",
|
|
"^/rev (.*)"},
|
|
run = run
|
|
}
|
|
--by Akamaru [https://ponywave.de] |