- Install rustup, justfile, sqlx-cli.
- Install Docker and Docker Compose.
- Create your Telegram application following instructions.
- Create a new bot with @BotFather.
- Clone this repository and change directory:
git clone https://github.com/neocim/steal_stickers_bot
cd steal_stickers_bot/
- Optionally run tests, using:
cargo test
- Copy config.toml.example, remove
.example
from name of file and fill it required information. - Copy .env.example, remove
.example
from name of file and fill it the same required information as in your fileconfig.toml
.
- First, we need to pull actual image of the bot, so as not to build it ourselves:
just pull-img
You can also build it manually using
just compose-build
- Then we need to authorize the client. Do it, using:
just auth
A code should be sent to your Telegram account. Enter it into the terminal without any extra characters.
- To finally run the bot, use:
just compose-run
- After the previous step, bot will start working, but database will be without migrations. To solve it, run the command below (it uses information from .env file):
just -E=./.env run-migrate
If you encounter errors that are directly related to my code (docker errors, bot bugs, etc.), please open an Issue. Thanks :)
Licensed under:
- MIT License (LICENSE or https://opensource.org/license/MIT)