chore: Update README.md
All checks were successful
Write changelog / write-changelog (push) Successful in 24s
Rust CI / Rust CI (push) Successful in 3m23s

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-05-31 19:06:13 +03:00
parent d7b2d222a0
commit 2fc7e8274e
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -1,32 +1,29 @@
<div align="center"
# TelePingBot # TelePingBot
A simple API to ping telegram bots and returns if it's online or not. using superbot to send message to the bots (mtproto). A simple API to ping telegram bots and returns if it's online or not. using superbot to send message to the bots (mtproto).
## Why is simple? [![Forgejo CI Status](https://git.4rs.nl/awiteb/telepingbot/badges/workflows/ci.yml/badge.svg)](https://git.4rs.nl/awiteb/telepingbot)
Add your API tokens in the `tokens.txt` and add the bot usernames in the `bots.txt` and you're ready to go! No need to generate tokens or anything else. [![Forgejo CD Status](https://git.4rs.nl/awiteb/telepingbot/badges/workflows/cd.yml/badge.svg)](https://git.4rs.nl/awiteb/telepingbot)
## `tokens.txt` file (rename `tokens.txt.example` to `tokens.txt`) [![agplv3-or-later](https://www.gnu.org/graphics/agplv3-88x31.png)](https://www.gnu.org/licenses/agpl-3.0.html)
The `tokens.txt` file is where you put your API tokens. You can put as many as you want, but make sure to put one in each line. This is API access tokens, you need to put it in `Authorization` header.
</div>
## Why is simple?
Add your API tokens (`Authorization` header) and your bot usernames in the `config.toml` file, and you're ready to go.
> [!NOTE]
> Check out the `config.toml.example` file to see how to fill the `config.toml` file.
> [!WARNING] > [!WARNING]
> > Remember to keep the `config.toml` file safe, because anyone can use it to ping your bots.
> Remember to keep this file safe, because anyone can use it to ping your bots.
> Recommended to generate the tokens with `openssl rand -hex 32` or `uuidgen`.
## `bots.txt` file (rename `bots.txt.example` to `bots.txt`) ## CLI Arguments
The `bots.txt` file is where you put your bot usernames, this to make sure to ping the specifics bots only. You can put as many as you want, but make sure to put one in each line. - `--config`: The path to the config file. (default: `config.toml`)
for example:
```
@BotFather
@SomeTestBot
@SomeTestBot
```
## `.env` file (rename `.env.example` to `.env`)
You need to fill the variables in it.
## Requirements ## Requirements
- Rust (MSRV 1.68.2) - Rust (MSRV 1.75.0)
- Cargo - Cargo
## Build ## Build
@ -38,7 +35,7 @@ cargo build --release
```bash ```bash
cargo run --release cargo run --release
``` ```
Or just run the binary file in `target/release/telepingbot` (Not recommended because the `.env` file) Or just run the binary file in `target/release/telepingbot`
## Endpoints ## Endpoints