ace4074a66
Updated readme with more plugins listed. Thanks to @TiagoDanin. |
||
---|---|---|
loc | ||
plugins | ||
.gitignore | ||
bindings.lua | ||
bot.lua | ||
config.lua.default | ||
console.lua | ||
dkjson.lua | ||
example-plugin.lua | ||
LICENSE | ||
README.md | ||
utilities.lua |
otouto
The plugin-wielding, multi-purpose Telegram bot.
Public bot runs on @mokubot.
To start, send "/start" or say "Hello, otouto."
##Plugins
help.lua | /help [command] | List commands |
about.lua | /about | Information about the bot |
gSearch.lua | /google <query> | Google Search |
gImages.lua | /images <query> | Google Images search |
reddit.lua | /reddit [r/subreddit | query] | Posts from reddit |
giphy.lua | /giphy [query] | Giphy search or random |
xkcd.lua | /xkcd [search] | xkcd strips and alt text |
gMaps.lua | /loc <location> | Google Maps search |
imdb.lua | /imdb <movie | TV series> | IMDb movie/television info |
urbandictionary.lua | /ud <term> | Urban Dictionary search |
hackernews.lua | /hackernews | Top stories from Hackernews |
time.lua | /time <location> | Get the time for a place |
weather.lua | /weather <location> | Get the weather for a place |
calc.lua | /calc <expression> | Solve math expression and convert units |
dice.lua | /roll [arg] | Roll a die. Accepts D&D notation |
remind.lua | /remind <delay> <message> | Set a reminder for yourself or a group |
8ball.lua | /8ball | Magic 8-ball |
bandersnatch.lua | /bandersnatch | Benedict Cumberbatch name generator |
bible.lua | /bible <verse> | King James Version |
btc.lua | /btc <currency> [amount] | Bitcoin prices and conversion |
commit.lua | /commit | http://whatthecommit.com |
dogify.lua | /dogify <lines/separatedby/slashes> | Create a doge image |
echo.lua | /echo <text> | Repeat a string |
fortune.lua | /fortune | Random fortunes |
hex.lua | /hex <number> | Convert to and from hexadecimal |
pokedex.lua | /dex <pokemon> | Pokedex! |
pun.lua | /pun | Puns |
slap.lua | /slap [victim] | Slap someone! |
whoami.lua | /who | Get user and group IDs |
nick.lua | /nick <nickname> | Set your nickname for the bot |
wikipedia.lua | /wiki <topic> | Search Wikipedia |
spotify.lua | /spotify <music> | Search Spotify |
youtube.lua | /youtube <query> | Search Youtube |
translate.lua | /translate [target lang] | Message to translate |
##Setup
Requires Lua, lua-socket and lua-sec. dkjson is provided. Written for Lua 5.2 but will probably run on 5.3.
You must have a Telegram bot and auth token from the BotFather to run this bot. telegram-cli is not required.
###Configuration
To begin, copy config.lua.default to config.lua and add the relevant information.
Most config.lua entries are self-explanatory.
Add your bot API key, and other API keys if desirable. The plugins which require API keys that are not provided are disabled by default. The provided Giphy key is the public test key, and is subject to rate limitaton.
The "fortune.lua" plugin requires the fortune program to be installed on the host computer.
"time_offset" is the time difference, in seconds, between your system clock. It is sometimes necessary for accurate output of the time plugin.
"admins" table includes the ID numbers, as integers, of any privileged users. These will have access to the admin plugin and any addition privileged commands.
"people" table is for the personality plugin:
["55994550"] = "topkecleon"
ID number must be a string. The second string is the nickname to be given to the identified user when a personality greeting is triggered.
To run:
lua bot.lua
##Support
Do not private message me for support.
For support for otouto as well as general Lua and bot assistance, please join the Bot Development group (send "/join 16314802" to @Liberbot. After you read the rules and the pastebin, I will assist you there.
###PS
Since there seems to be some confusion on the matter, otouto is not a port of yagop's telegram-bot. I am friends with yagop, and he is part of the Bot Development group, but our codebases are and always have been entirely separate. otouto was a CLI bot like telegram-bot before the new API, but they were entirely separate, non-intermingled projects.