Skip to content

Commit

Permalink
docs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
litnialex committed Sep 21, 2024
1 parent 614d546 commit 7d2edcd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/en/Telegram-Bot-Flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The Telegram bot API method [setWebhook] must be called to start receiving updat

```bash
TOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi
curl -F "url=${HOST}:8443/bot${TOKEN}" -F certificate=@ssl/cert.pem https://api.telegram.org/bot${TOKEN}/setWebhook
curl -F "url=${HOST}:8443/${TOKEN}" -F certificate=@ssl/cert.pem https://api.telegram.org/bot${TOKEN}/setWebhook
```

Additionally, you may define an API_SECRET variable to prevent unauthorized webhook calls.
Expand All @@ -57,4 +57,4 @@ Just repeat last step for each of your bots.

[flask]: https://flask.palletsprojects.com/en/latest/
[repo]: https://github.com/litnialex/telegram-proxybot
[setWebhook]: https://core.telegram.org/bots/api#setwebhook
[setWebhook]: https://core.telegram.org/bots/api#setwebhook
2 changes: 1 addition & 1 deletion docs/en/Telegram-Bot-Serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The Telegram bot API method [setWebhook] must be called to start receiving updat
```
CLOUD_URL=https://***********.cloudfunctions.net/proxybot
TOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi
curl -F "url=${CLOUD_URL}/bot${TOKEN}" https://api.telegram.org/bot${TOKEN}/setWebhook
curl -F "url=${CLOUD_URL}/${TOKEN}" https://api.telegram.org/bot${TOKEN}/setWebhook
```

Replace `TELEGRAM_ID`, `DB_URI`, `REGION`, `CLOUD_URL`, `TOKEN` variable values with your data.
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/Telegram-Bot-Flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ docker run --rm -p 8080:8080 -p 8443:8443 -v ./ssl:/app/ssl \

```bash
TOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi
curl -F "url=${HOST}:8443/bot${TOKEN}" -F certificate=@ssl/cert.pem https://api.telegram.org/bot${TOKEN}/setWebhook
curl -F "url=${HOST}:8443/${TOKEN}" -F certificate=@ssl/cert.pem https://api.telegram.org/bot${TOKEN}/setWebhook
```

Можно дополнительно задать переменную API_SECRET и укзать её в webhook. Для этого команде `curl` добавляется опция ```-F secret_token=${API_SECRET}```. Тогда неавторизованные запросы будут игнорироваться.
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/Telegram-Bot-Serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gcloud functions deploy --gen2 --region=$REGION --runtime=python310 \
```
CLOUD_URL=https://***********.cloudfunctions.net/proxybot
TOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi
curl -F "url=${CLOUD_URL}/bot${TOKEN}" https://api.telegram.org/bot${TOKEN}/setWebhook
curl -F "url=${CLOUD_URL}/${TOKEN}" https://api.telegram.org/bot${TOKEN}/setWebhook
```

Замените значения переменных `TELEGRAM_ID`, `DB_URI`, `REGION`, `CLOUD_URL`, `TOKEN` на ваши данные.
Expand Down

0 comments on commit 7d2edcd

Please sign in to comment.