From ef5469f62a1e2dbb38b6d0ef1575cf35a4f6d034 Mon Sep 17 00:00:00 2001 From: dupie Date: Wed, 8 Jul 2015 16:01:15 -0400 Subject: [PATCH] shrug & lenny now reply to a replied message fewer parsing errors with dogify help now triggered with /start --- plugins/dogify.lua | 1 + plugins/help.lua | 1 + plugins/lenny.lua | 6 ++++++ plugins/shrug.lua | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/plugins/dogify.lua b/plugins/dogify.lua index e95535f..3201407 100644 --- a/plugins/dogify.lua +++ b/plugins/dogify.lua @@ -18,6 +18,7 @@ function PLUGIN.action(msg) end local input = string.gsub(input, ' ', '') + local input = string.lower(input) url = 'http://dogr.io/' .. input .. '.png' diff --git a/plugins/help.lua b/plugins/help.lua index 8f0248f..36fea8b 100644 --- a/plugins/help.lua +++ b/plugins/help.lua @@ -8,6 +8,7 @@ PLUGIN.doc = [[ PLUGIN.triggers = { '^/help', '^/h$', + '^/start$' } function PLUGIN.action(msg) diff --git a/plugins/lenny.lua b/plugins/lenny.lua index ad745fb..34ee8a1 100644 --- a/plugins/lenny.lua +++ b/plugins/lenny.lua @@ -5,7 +5,13 @@ PLUGIN.triggers = { } function PLUGIN.action(msg) + + if msg.reply_to_message then + msg = msg.reply_to_message + end + send_msg(msg, '( ͡° ͜ʖ ͡°)') + end return PLUGIN diff --git a/plugins/shrug.lua b/plugins/shrug.lua index 66d4705..1f7e686 100644 --- a/plugins/shrug.lua +++ b/plugins/shrug.lua @@ -5,7 +5,13 @@ PLUGIN.triggers = { } function PLUGIN.action(msg) + + if msg.reply_to_message then + msg = msg.reply_to_message + end + send_msg(msg, '¯\\_(ツ)_/¯') + end return PLUGIN