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:
parent
f2b243a47c
commit
81b67d0aa3
@ -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.',
|
||||
|
@ -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)
|
||||
|
@ -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$'
|
||||
|
||||
|
Reference in New Issue
Block a user