okay i might be done

for now
This commit is contained in:
topkecleon 2016-02-25 10:08:27 -05:00
parent 3e9d6a50b2
commit ffccdd8667
2 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# otouto # otouto
The plugin-wielding, multipurpose Telegram bot. The plugin-wielding, multipurpose Telegram bot.
[Public Bot](http://telegram.me/mokubot) ¦ [Official Channel](http://telegram.me/otouto) ¦ [Development Group](http://telegram.me/BotDevelopment) [Public Bot](http://telegram.me/mokubot) | [Official Channel](http://telegram.me/otouto) | [Development Group](http://telegram.me/BotDevelopment) | [Owner's Manual](http://otou.to/rtfm)
otouto is an independently-developed Telegram API bot written in Lua. Originally conceived as a CLI script in February of 2015, otouto has since been open-sourced and migrated to the API, and is being developed to this day. otouto is an independently-developed Telegram API bot written in Lua. Originally conceived as a CLI script in February of 2015, otouto has since been open-sourced and migrated to the API, and is being developed to this day.
@ -203,6 +203,10 @@ Once this is set up, put your bot in the admin group and run `/modadd` and `/mod
* * * * * *
## Style {#Style}
Bot output from every plugin should follow a consistent style. This style is easily observed interacting with the bot.
Titles should be either **bold** (along with their colons) or a [link](http://otou.to) (with plaintext colons) to the content's source. Names should be _italic_. Numbered lists should use bold numbers followed by a bold period followed by a space. Unnumbered lists should use the • bullet point followed by a space. Descriptions and information should be in plaintext, although "flavor" text should be italic. Technical information should be `monospace`. Links should be named.
## Contributors {#Contributors} ## Contributors {#Contributors}
Everybody is free to contribute to otouto. If you are interested, you are invited to fork the [repo](http://github.com/topkecleon/otouto) and start making pull requests.. If you have an idea and you are not sure how to implement it, open an issue or bring it up in the Bot Development group. Everybody is free to contribute to otouto. If you are interested, you are invited to fork the [repo](http://github.com/topkecleon/otouto) and start making pull requests.. If you have an idea and you are not sure how to implement it, open an issue or bring it up in the Bot Development group.

View File

@ -1,3 +1,8 @@
-- Never change this plugin. It was not meant to be changed.
-- You may add reactions. You must never remove reactions.
-- You must never restructure. You must never disable this plugin.
-- ~ Drew, creator, a year later.
local command = 'reactions' local command = 'reactions'
local doc = '`Returns a list of "reaction" emoticon commands.`' local doc = '`Returns a list of "reaction" emoticon commands.`'
@ -11,22 +16,20 @@ local triggers = {
} }
-- Generate a "help" message triggered by "/reactions". -- Generate a "help" message triggered by "/reactions".
local help = '' local help = 'Reactions:\n'
for k,v in pairs(triggers) do for k,v in pairs(triggers) do
help = help .. v:gsub('?', '') .. ': ' .. k .. '\n' help = help .. '' .. v:gsub('%a%?', '') .. ': ' .. k .. '\n'
v = v .. '[@'..bot.username..']*' v = v .. '[@'..bot.username..']*'
end end
triggers[help] = '^/reactions$' triggers[help] = '^/reactions$'
local action = function(msg) local action = function(msg)
for k,v in pairs(triggers) do for k,v in pairs(triggers) do
if string.match(msg.text_lower, v) then if string.match(msg.text_lower, v) then
sendMessage(msg.chat.id, k) sendMessage(msg.chat.id, k)
return return
end end
end end
end end
return { return {