A simple Telegram Bot for Odoo!
A simple Telegram Bot for Odoo!
This project has been developed on a Linux system. To learn more about the system, visit the Dotfiles repository.
/
├── docs/
│ └── *.md
├── CONTRIBUTING
├── LICENSE
├── .env
├── bot.py
└── requirements.txt
Open a terminal in the directory where you store your repositories and clone it with the following command:
# HTTPS
git clone https://github.com/MetaChannelCorp/TelegramBot.git
cd TelegramBot/
# SSH
git clone git@github.com:MetaChannelCorp/TelegramBot.git
cd TelegramBot/
Copy .env.example to .env and fill the credentials:
cp .env.example .env
nano .env
python3 -m venv venv
source venv/bin/activate
Install the latest stable release of python-telegram-bot with the following command:
pip install python-telegram-bot --upgrade
We also need python-dotenv to be able to import the environment variables from the .env file:
pip install python-dotenv
Export the dependencies installed in the virtual environment with the following command:
pip freeze > requirements.txt
This project is closely linked to another project; before running the Telegram bot, run the Docker service from the Odoo repository.
Once the Docker containers from the Odoo repository are up and running, you can start the bot with the following command:
python3 bot/main.py