This bot can solve different tasks using computational knowledge engine Wolfram Alpha
Setup the following environment variables or specify them in a file .env in the project root:
- TELEGRAM_TOKEN - telegram token of the bot. It can be obtained from BotFather.
- WOLFRAM_APP_ID - an ID of the Wolfram Alpha application. Visit WolframAlpha API and register your app to get it.
- DATABASE_URL - path to the database.
- HOST_URL and HOST_PORT - URL and PORT of the hosting server. If you are using long polling method, you may do not specify this.
Python 3.6 or higher should be already installed. Create virtual environment and use pip to install dependencies. Example on Linux:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
You can install dependencies without virtual environment, but it's not recommended.
Run the following commands to migrate database
flask db upgrade
If you use Heroku, it can be done by Heroku CLI
heroku run upgrade
Run the following command under activated virtual environment:
flask telegram polling
You can host the bot using Heroku. Sign up on this site, install heroku-cli on your PC and run following commands:
heroku login
heroku create <your app name>
git push heroku master
Simply go to the frontend folder and run a deployment script
cd frontend
./deploy.sh