From bd4ec9b5746c5b69d719a9a144ff76e846cd59f3 Mon Sep 17 00:00:00 2001 From: Brayden Date: Thu, 18 Feb 2016 21:48:10 -0800 Subject: [PATCH] Essential feature --- .editorconfig | 10 ++++++++++ plugins/ping.lua | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..845522b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.lua] +charset = utf-8 +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/plugins/ping.lua b/plugins/ping.lua index d176e47..2bde4d8 100755 --- a/plugins/ping.lua +++ b/plugins/ping.lua @@ -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 {