You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
We shall not divide by zero |
1 year ago | |
---|---|---|
images | 5 years ago | |
locales | 1 year ago | |
test | 2 years ago | |
.gitignore | 6 years ago | |
AUTHORS.md | 1 year ago | |
Dockerfile | 2 years ago | |
LICENSE | 7 years ago | |
Pipfile | 4 years ago | |
Pipfile.lock | 4 years ago | |
README.md | 2 years ago | |
TRANSLATORS.md | 1 year ago | |
actions.py | 4 years ago | |
bot.py | 4 years ago | |
card.py | 4 years ago | |
commandlist.txt | 2 years ago | |
config.json.example | 5 years ago | |
config.py | 5 years ago | |
database.py | 5 years ago | |
deck.py | 4 years ago | |
errors.py | 7 years ago | |
game.py | 5 years ago | |
game_manager.py | 5 years ago | |
genpot.sh | 4 years ago | |
internationalization.py | 5 years ago | |
logo.png | 7 years ago | |
mwt.py | 6 years ago | |
player.py | 5 years ago | |
requirements.txt | 5 years ago | |
results.py | 4 years ago | |
settings.py | 6 years ago | |
shared_vars.py | 2 years ago | |
simple_commands.py | 1 year ago | |
start_bot.py | 7 years ago | |
user_setting.py | 5 years ago | |
utils.py | 4 years ago |
README.md
UNO Bot
Telegram Bot that allows you to play the popular card game UNO via inline queries. The bot currently runs as @unobot.
To run the bot yourself, you will need:
- Python (tested with 3.4+)
- The python-telegram-bot module
- Pony ORM
Setup
- Get a bot token from @BotFather and change configurations in
config.json
. - Convert all language files from
.po
files to.mo
by executing the bash scriptcompile.sh
located in thelocales
folder. Another option is: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. - Use
/setcommands
and submit the list of commands in commandlist.txt - Install requirements (using a
virtualenv
is recommended):pip install -r requirements.txt
You can change some gameplay parameters like turn times, minimum amount of players and default gamemode in config.json
.
Current gamemodes available: classic, fast and wild. Check the details with the /modes
command.
Then run the bot with python3 bot.py
.
Code documentation is minimal but there.