HowTo:
- Create your own bot using Telegram's BotFather and grab your
TOKEN
- Clone this repository
git clone https://github.com/achicha/telegram-bot
- Virtual Environment (optional):
cd telegram-bot
pip install
pipenv
- Install all dependencies:
pipenv install
orpip install -r Pipfile
- Try local heroku
- install Heroku CLI:
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
- create entry point.
touch Procfile
withweb: python run.py
inside it. - login:
heroku login
- create app:
heroku create
- create
.env
file and add there config vars fromsettings.py
- run local heroku:
heroku local web
- install Heroku CLI:
- Deploy to remote heroku:
- add heroku remote branch:
heroku git:remote -a MyHerokuAppName
if it is not theregit remote -v
- copy .env params to the server:
heroku config:push
- deploy:
git push heroku master
- check logs:
heroku logs -n 10
- restart app if needed:
heroku restart MyHerokuAppName
- add heroku remote branch:
todo:
- add telegram bot links
- resend errors
- block wrong messages like /start or others
- several api links
- store all requests to local heroku DB
Links: