This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot-2/README.md
topkecleon 42cda22ab6 much improved personality.lua interactions
partial localization support
2015-07-11 04:31:29 -04:00

5.0 KiB

otouto

The plugin-wielding, multi-purpose Telegram bot.

Public bot runs on @mokubot.

##Plugins

about.lua /about Information about the bot
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
calc.lua /calc <expression> Solve math expression and convert units
commit.lua /commit http://whatthecommit.com
dice.lua /roll [arg] Roll a die. Accepts D&D notation
dogify.lua /dogify <lines/separatedby/slashes> Create a doge image
echo.lua /echo <text> Repeat a string
fortune.lua /fortune Random fortunes
gSearch.lua /google <query> Google Search
gMaps.lua /loc <location> Google Maps search
gImages.lua /images <query> Google Images search
giphy.lua /giphy [query] Giphy search or random
hackernews.lua /hackernews Top stories from Hackernews
help.lua /help [command] List commands
hex.lua /hex <number> Convert to and from hexadecimal
imdb.lua /imdb <movie | TV series> IMDb movie/television info
pokedex.lua /dex <pokemon> Pokedex!
pun.lua /pun Puns
reddit.lua /reddit [r/subreddit | query] Posts from reddit
remind.lua /remind <delay> <message> Set a reminder for yourself or a group
slap.lua /slap [victim] Slap someone!
time.lua /time <location> Get the time for a place
urbandictionary.lua /ud <term> Urban Dictionary search
weather.lua /weather <location> Get the weather for a place
whoami.lua /who Get user and group IDs
xkcd.lua /xkcd [search] xkcd strips and alt text

##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

Most config.json 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. Default at 0 (duh).

"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

Please do not private message me for support. I will probably block you.

For support for otouto as well as general Lua and bot assistance, please join the CIS Bot Development group. After you read the rules and the pastebin, I will assist you there.