2016-03-08 09:11:38 +08:00
|
|
|
# UNO Bot
|
2017-02-24 13:26:58 +08:00
|
|
|
|
|
|
|
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](./LICENSE)
|
|
|
|
|
2017-08-19 05:36:30 +08:00
|
|
|
Telegram Bot that allows you to play the popular card game UNO via inline queries. The bot currently runs as [@unobot](http://telegram.me/unobot).
|
2016-03-08 09:11:38 +08:00
|
|
|
|
|
|
|
To run the bot yourself, you will need:
|
2017-08-19 05:36:30 +08:00
|
|
|
- Python (tested with 3.4+)
|
|
|
|
- The [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) module
|
2016-09-01 09:58:46 +08:00
|
|
|
- [Pony ORM](https://ponyorm.com/)
|
2016-03-08 09:11:38 +08:00
|
|
|
|
2017-02-24 13:26:58 +08:00
|
|
|
## Setup
|
2017-08-19 05:36:30 +08:00
|
|
|
- Get a bot token from [@BotFather](http://telegram.me/BotFather) and change configurations in `config.json`.
|
|
|
|
- Convert all language files from `.po` files to `.mo` files using `msgfmt unobot.po -o unobot.mo`.
|
|
|
|
Also try `find . -maxdepth 2 -type d -name 'LC_MESSAGES' -exec bash -c 'msgfmt {}/unobot.po -o {}/unobot.mo' \;`.
|
|
|
|
- Use `/setinline` and `/setinlinefeedback` with BotFather for your bot.
|
2016-09-01 09:58:46 +08:00
|
|
|
|
2017-08-19 05:36:30 +08:00
|
|
|
Then run the bot with `python3 bot.py`.
|
2016-03-08 09:11:38 +08:00
|
|
|
|
2017-08-19 05:36:30 +08:00
|
|
|
Code documentation is minimal but there.
|