al42and / avatar-decorator-bot

Телеграм-бот для добавления цветных кружков к аватаркам. Создан для игры Дозор.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running locally with polling

  1. Create file bot.ini with following content:
[Common]
DATABASE_URL = '/tmp/avatar-decorator-bot.sqlite'  # Or wherever you want to put your database
TOKEN = 'your-token-from-@BotFather'
USE_WEBHOOK = no
  1. Create virtualenv and install dependencies:
python3 -m virtualenv venv -p python3 && source ./venv/bin/activate && python -m pip install -r requirements.txt
  1. Run tests:
python -m nose .
  1. Run bot in the current console:
python main.py

Running on Heroku

  1. Initialize an app:
heroku login && heroku create && heroku addons:create heroku-postgresql:hobby-dev
  1. Set environment variables:
heroku config:set TOKEN=your-token-from-@BotFather
heroku config:set WEBHOOK_URL=$(heroku info -s | grep web_url | cut -d= -f2)
  1. Deploy:
git push heroku master && heroku ps:scale web=1

About

Телеграм-бот для добавления цветных кружков к аватаркам. Создан для игры Дозор.

License:The Unlicense


Languages

Language:Python 99.9%Language:Procfile 0.1%