chore: Update README.md
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
parent
d7b2d222a0
commit
2fc7e8274e
1 changed files with 18 additions and 21 deletions
39
README.md
39
README.md
|
@ -1,32 +1,29 @@
|
|||
<div align="center"
|
||||
|
||||
# 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).
|
||||
|
||||
## Why is simple?
|
||||
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 CI Status](https://git.4rs.nl/awiteb/telepingbot/badges/workflows/ci.yml/badge.svg)](https://git.4rs.nl/awiteb/telepingbot)
|
||||
[![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`)
|
||||
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.
|
||||
[![agplv3-or-later](https://www.gnu.org/graphics/agplv3-88x31.png)](https://www.gnu.org/licenses/agpl-3.0.html)
|
||||
|
||||
</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]
|
||||
>
|
||||
> 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`.
|
||||
> Remember to keep the `config.toml` file safe, because anyone can use it to ping your bots.
|
||||
|
||||
## `bots.txt` file (rename `bots.txt.example` to `bots.txt`)
|
||||
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.
|
||||
|
||||
for example:
|
||||
```
|
||||
@BotFather
|
||||
@SomeTestBot
|
||||
@SomeTestBot
|
||||
```
|
||||
|
||||
## `.env` file (rename `.env.example` to `.env`)
|
||||
You need to fill the variables in it.
|
||||
## CLI Arguments
|
||||
- `--config`: The path to the config file. (default: `config.toml`)
|
||||
|
||||
## Requirements
|
||||
- Rust (MSRV 1.68.2)
|
||||
- Rust (MSRV 1.75.0)
|
||||
- Cargo
|
||||
|
||||
## Build
|
||||
|
@ -38,7 +35,7 @@ cargo build --release
|
|||
```bash
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue