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/otouto/plugins/ping.lua
topkecleon b7c81c464f otouto v3.12
Minor changes across the board. More planned. I also may have accidentally screwed with access
permissions (so looks like every file is marked modified).
Moved drua-tg.lua into the otouto/ directory.
Added pokego-calculator.lua plugin (similar to pidgeycalc.com).
2016-07-25 05:03:35 -04:00

17 lines
431 B
Lua

-- Actually the simplest plugin ever!
local ping = {}
local utilities = require('otouto.utilities')
function ping:init(config)
ping.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('ping'):t('annyong').table
end
function ping:action(msg, config)
local output = msg.text_lower:match('^'..config.cmd_pat..'ping') and 'Pong!' or 'Annyong.'
utilities.send_message(self, msg.chat.id, output)
end
return ping