Skip to content

MetaChannelCorp/TelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TelegramBot

GitHub Pages GitHub Stars

Index

  1. Introduction
  2. Project structure
  3. Clone the repository
  4. Set up the project
  5. Create the virtual environment
  6. Install dependencies
  7. Run it!
  8. Resources

Introduction

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.

Project structure

/
├── docs/
│   └── *.md
├── CONTRIBUTING
├── LICENSE
├── .env
├── bot.py
└── requirements.txt

Clone the repository

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/

Set up the project

Copy .env.example to .env and fill the credentials:

cp .env.example .env
nano .env

Create the virtual environment

python3 -m venv venv
source venv/bin/activate

Install dependencies

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

Run it!

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

Resources

python-telegram-bot · BotFather · userinfobot

About

A simple Telegram Bot for Odoo!

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages