<commit_before># otouto
The plugin-wielding, multipurpose Telegram bot.

[Public Bot](http://telegram.me/mokubot) | [Official Channel](http://telegram.me/otouto) | [Development Group](http://telegram.me/BotDevelopment)

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 free software; you are free to redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3. See `LICENSE` for details.

| The Manual                               |
|:-----------------------------------------|
| [Setup](#setup)                          |
| [Bindings](#bindings)                    |
| [Plugins](#plugins)                      |
| [Control plugins](#control-plugins)      |
| [administration.lua](#administrationlua) |
| [List of plugins](#list-of-plugins)      |
| [Style](#style)                          |
| [Contributors](#contributors)            |

## Setup
You _must_ have Lua (5.2+), luasocket, luasec, multipart-post, and dkjson installed. You should also have lpeg, though it is not required. It is recommended you install these with LuaRocks.

Clone the repository and set the following values in `config.lua`:

 - `bot_api_key` as your bot authorization token from the BotFather.
 - `admin` as your Telegram ID.

Optionally:

 - `lang` as the two-letter code representing your language.

Some plugins are not enabled by default. If you wish to enable them, add them to the `plugins` array.

When you are ready to start the bot, run `./launch.sh`. To stop the bot, send "/halt" through Telegram. If you terminate the bot manually, you risk data loss. If you do you not want the bot to restart automatically, run it with `lua main.lua`.

Note that certain plugins, such as translate.lua and greetings.lua, will require privacy mode to be disabled. Additionally, some plugins may require or make use of various API keys:

 - gImages.lua & youtube.lua: Google [API](http://console.developers.google.com) and [CSE](https://cse.google.com/cse) keys (`google_api_key`, `google_cse_key`)
 - weather.lua: [OpenWeatherMap](http://openweathermap.org) API key (`owm_api_key`)
 - lastfm.lua: [last.fm](http://last.fm/api) API key (`lastfm_api_key`)
 - bible.lua: [Biblia](http://api.biblia.com) API key (`biblia_api_key`)
 - cats.lua: [The Cat API](http://thecatapi.com) API key (optional) (`thecatapi_key`)
 - apod.lua: [NASA](http://api.nasa.gov) API key (`nasa_api_key`)
 - translate.lua: [Yandex](http://tech.yandex.com/keys/get) API key (`yandex_key`)<commit_msg>readme: added bing API link<commit_after># otouto
The plugin-wielding, multipurpose Telegram bot.

[Public Bot](http://telegram.me/mokubot) | [Official Channel](http://telegram.me/otouto) | [Development Group](http://telegram.me/BotDevelopment)

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 free software; you are free to redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3. See LICENSE for details.

| The Manual                               |
|:-----------------------------------------|
| [Setup](#setup)                          |
| [Bindings](#bindings)                    |
| [Plugins](#plugins)                      |
| [Control plugins](#control-plugins)      |
| [administration.lua](#administrationlua) |
| [List of plugins](#list-of-plugins)      |
| [Style](#style)                          |
| [Contributors](#contributors)            |

## Setup
You _must_ have Lua (5.2+), luasocket, luasec, multipart-post, and dkjson installed. You should also have lpeg, though it is not required. It is recommended you install these with LuaRocks.

Clone the repository and set the following values in `config.lua`:

 - `bot_api_key` as your bot authorization token from the BotFather.
 - `admin` as your Telegram ID.

Optionally:

 - `lang` as the two-letter code representing your language.

Some plugins are not enabled by default. If you wish to enable them, add them to the `plugins` array.

When you are ready to start the bot, run `./launch.sh`. To stop the bot, send "/halt" through Telegram. If you terminate the bot manually, you risk data loss. If you do you not want the bot to restart automatically, run it with `lua main.lua`.

Note that certain plugins, such as translate.lua and greetings.lua, will require privacy mode to be disabled. Additionally, some plugins may require or make use of various API keys:

 - bing.lua: [Bing Search API](http://datamarket.azure.com/dataset/bing/search) key (`bing_api_key`)
 - gImages.lua & youtube.lua: Google [API](http://console.developers.google.com) and [CSE](https://cse.google.com/cse) keys (`google_api_key`, `google_cse_key`)
 - weather.lua: [OpenWeatherMap](http://openweathermap.org) API key (`owm_api_key`)
 - lastfm.lua: [last.fm](http://last.fm/api) API key (`lastfm_api_key`)
 - bible.lua: [Biblia](http://api.biblia.com) API key (`biblia_api_key`)
 - cats.lua: [The Cat API](http://thecatapi.com) API key (optional) (`thecatapi_key`)
 - apod.lua: [NASA](http://api.nasa.gov) API key (`nasa_api_key`)
 - translate.lua: [Yandex](http://tech.yandex.com/keys/get) API key (`yandex_key`)
{'fraction_non_alphanumeric': 0.13123743374154634, 'fraction_numerical': 0.0025589471760190095, 'mean_word_length': 3.2884012539184955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1578064', 'n_tokens_mistral': 1711, 'n_tokens_neox': 1595, 'n_words': 585}