From 81b67d0aa35472680ef6ab05265827f5da5e19c3 Mon Sep 17 00:00:00 2001 From: topkecleon Date: Sat, 16 Jan 2016 23:57:25 -0500 Subject: [PATCH] Fixed issue #16. reactions.lua: commands can now be run with @username. about.lua: No longer links otouto channel by default (that was an accident). --- config.lua | 3 --- plugins/about.lua | 2 +- plugins/reactions.lua | 15 ++++++++------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/config.lua b/config.lua index 943bc5b..13f0004 100755 --- a/config.lua +++ b/config.lua @@ -18,9 +18,6 @@ return { I am otouto, the plugin-wielding, multi-purpose Telegram bot. Send /help to get started. - -Join my channel for news about updates! -telegram.me/otouto ]] , errors = { connection = 'Connection error.', diff --git a/plugins/about.lua b/plugins/about.lua index 687c4cb..ed73fa2 100755 --- a/plugins/about.lua +++ b/plugins/about.lua @@ -11,7 +11,7 @@ local action = function(msg) -- other plugins. if msg.forward_from then return end - local message = config.about_text .. '\nBased on otouto v'..version..' by topkecleon.\notouto v3 is licensed under the GPLv2.\ntopkecleon.github.io/otouto' + local message = config.about_text .. '\nBased on otouto v'..version..' by topkecleon.\notouto v3 is licensed under the GPLv2.\ngithub.com/topkecleon/otouto' if msg.new_chat_participant and msg.new_chat_participant.id == bot.id then sendMessage(msg.chat.id, message, true) diff --git a/plugins/reactions.lua b/plugins/reactions.lua index e236375..1271c0f 100755 --- a/plugins/reactions.lua +++ b/plugins/reactions.lua @@ -2,18 +2,19 @@ local command = 'reactions' local doc = '`Returns a list of "reaction" emoticon commands.`' local triggers = { - ['¯\\_(ツ)_/¯'] = '/shrug$', - ['( ͡° ͜ʖ ͡°)'] = '/lenny$', - ['(╯°□°)╯︵ ┻━┻'] = '/flip$', - ['┌(┌ ^o^)┐'] = '/homo$', - ['ಠ_ಠ'] = '/look$', - ['SHOTS FIRED'] = '/shots?$' + ['¯\\_(ツ)_/¯'] = '/shrug', + ['( ͡° ͜ʖ ͡°)'] = '/lenny', + ['(╯°□°)╯︵ ┻━┻'] = '/flip', + ['┌(┌ ^o^)┐'] = '/homo', + ['ಠ_ಠ'] = '/look', + ['SHOTS FIRED'] = '/shots?' } -- Generate a "help" message triggered by "/reactions". local help = '' for k,v in pairs(triggers) do - help = help .. v:gsub('%$', ': '):gsub('?', '') .. k .. '\n' + help = help .. v:gsub('?', '') .. ': ' .. k .. '\n' + v = v .. '[@'..bot.username..']*' end triggers[help] = '^/reactions$'