Trader One Bot™ is a telegram bot built with Telegram's Bot API in Python programming language.
👥 Maintainers:
-
Nuriddin Islamov (@nuriddinislamov)
-
Jahongir Nagmatov (@jakhongeer)
-
Javlon Kayumov (@iamjavlon)
Instructions for developer:
We are happy to hear that you are the next major developer of this project. This project has been developed strongly by the instructions of the business owner. Here you can find all the information about installation, code quality, maintenance and deployment.
Installation
- Clone the repository using
git clone
command on your machine:
$ git clone https://github.com/ez-developers/traderbot.git
- Move into the project directory:
$ cd traderbot
- Create a virtual environment:
$ python3 -m venv venv
- Activate the virtual environment:
$ source venv/bin/activate
- Install all required packages:
$ pip install -r requirements.txt
api
directory of the project folder
❗️ Note: Bot is fully dependent on the backend server. Database connections are done with RESTful API built in the Before moving on to runnning the bot and the server, you will need to create a .env
file (note that the file does not have a name) in the root of the project directory.
Fill up the content of the file with following:
- BOT_TOKEN: bot's token (you can get one from @BotFather)
- DB_IP: public IP address of the database server.
Portfolios model.
Notice! You should use PostgreSQL database engine, as the project relies on the ArrayField in the - DB_NAME: name of the database on the server (more)
- DB_USER: database user's username
- DB_PASSWORD: database user's password
- API_USER: username for accessing backend server API with HTTP calls
- API_PASSWORD: password for accessing backend server API with HTTP calls
- PAYMENT_TOKEN: token for accessing payments API of the Telegram
- SECRET_KEY: django secret key
After that, you will need to change the configurations in the settings.py. Now you are ready to start running the server and the bot itself.
Running the bot and the server
If you are following the instructions from the very beginning, then continue here, otherwise please go up.
- First, run the server. To run:
$ python3 manage.py runserver
- Then run the bot:
$ python3 bot.py
If logger
in your main.py is set to level=logging.DEBUG
you will see the output of all incoming updates from Telegram servers.