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).
This commit is contained in:
topkecleon 2016-01-16 23:57:25 -05:00
parent f2b243a47c
commit 81b67d0aa3
3 changed files with 9 additions and 11 deletions

View File

@ -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.',

View File

@ -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)

View File

@ -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$'