b7c81c464f
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).
17 lines
431 B
Lua
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
|