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-2/plugins/reaction.lua

27 lines
467 B
Lua
Raw Normal View History

local PLUGIN = {}
PLUGIN.triggers = {
['¯\\_(ツ)_/¯'] = '/shrug$',
['( ͡° ͜ʖ ͡°)'] = '/lenny$',
['(╯°□°)╯︵ ┻━┻'] = '/flip$',
2015-07-11 04:04:56 +02:00
[' o'] = '/homo$'
}
function PLUGIN.action(msg)
local message = string.lower(msg.text)
if msg.reply_to_message then
msg = msg.reply_to_message
end
for k,v in pairs(PLUGIN.triggers) do
if string.match(message, v) then
return send_msg(msg, k)
end
end
end
return PLUGIN