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/ping.lua
2016-02-18 21:20:10 -08:00

17 lines
312 B
Lua
Executable File

-- Actually the simplest plugin ever!
local triggers = {
'^/ping[@'..bot.username..']*',
'^/annyong[@'..bot.username..']*'
}
local action = function(msg)
sendMessage(msg.chat.id,
msg.text_lower.match('^/ping') and 'Pong!' or 'Annyong.')
end
return {
action = action,
triggers = triggers
}