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
dupie 566db41184 combined shrug and lenny
added flip, homo, shot

added reply arguments to 8ball, slap, whoami
aliased "/who" to whoami
2015-07-10 20:46:51 -04:00

28 lines
489 B
Lua
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local PLUGIN = {}
PLUGIN.triggers = {
['¯\\_(ツ)_/¯'] = '/shrug$',
['( ͡° ͜ʖ ͡°)'] = '/lenny$',
['(╯°□°)╯︵ ┻━┻'] = '/flip$',
[' o'] = '/homo$',
['🔫'] = '/shot$'
}
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