Bot example: @smartchallenge_example_bot
-
Clone the repository:
git clone https://github.com/nessshon/smartchallenge-bot.git
-
Change into the bot directory:
cd smartchallenge-bot
-
Clone environment variables file:
cp .env.example .env
-
Configure environment variables variables file:
nano .env
-
Running a bot in a docker container:
docker-compose up --build
Here is a reference guide for the environment variables used in the project:
Variable | Type | Description | Example |
---|---|---|---|
BOT_TOKEN | str | Bot token, obtained from @BotFather | 123456:qweRTY |
BOT_DEV_ID | int | User ID of the bot developer | 123456789 |
TON_CONNECT_MANIFEST_URL | str | tonconnect manifest URL | https://...json |
REDIS_HOST | str | The hostname or IP address of the Redis server | redis |
REDIS_PORT | int | The port number on which the Redis server is running | 6379 |
REDIS_DB | int | The Redis database number | 1 |
MYSQL_HOST | str | The hostname or IP address of the database server | localhost |
MYSQL_PORT | int | The port number on which the database server is running | 3306 |
MYSQL_USER | str | The username for accessing the database | user |
MYSQL_PASSWORD | str | The password for accessing the database | password |
MYSQL_DATABASE | str | The name of the database | dbname |