Essential feature

This commit is contained in:
Brayden 2016-02-18 21:48:10 -08:00 committed by Brayden Banks
parent 5cb058ec6b
commit bd4ec9b574
2 changed files with 14 additions and 2 deletions

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.lua]
charset = utf-8
indent_style = space
indent_size = 2

View File

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