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

23 lines
638 B
Lua
Raw Normal View History

2015-06-17 20:27:21 +02:00
-- 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'
2016-02-02 16:13:57 +01:00
elseif string.match(msg.text, '/flip') then
2015-06-17 20:27:21 +02:00
local text = run_bash('flip "' .. text .. '"')
send_msg(receiver, text, ok_cb, false)
2016-02-02 16:13:57 +01:00
elseif string.match(msg.text, '/rev') then
local text = run_bash('echo "' .. text .. '" | rev')
send_msg(receiver, text, ok_cb, false)
2015-06-17 20:27:21 +02:00
end
end
return {
description = "",
usage = {""},
2016-02-02 16:13:57 +01:00
patterns = {"^/flip (.*)$",
"^/rev (.*)"},
2015-06-17 20:27:21 +02:00
run = run
}
--by Akamaru [https://ponywave.de]