https://github.com/rust-italia/rusty-bot
A simple Telegram Bot for Rust Telegram channels
https://github.com/rust-italia/rusty-bot
Last synced: about 2 months ago
JSON representation
A simple Telegram Bot for Rust Telegram channels
- Host: GitHub
- URL: https://github.com/rust-italia/rusty-bot
- Owner: rust-italia
- Created: 2022-11-27T16:11:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-27T16:11:56.000Z (over 2 years ago)
- Last Synced: 2025-01-18T07:31:47.852Z (4 months ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rusty bot
This is a very simple Telegram Bot made in Rust for Rust Telegram groups.
## Running
There are some environment variables that are used by the executable:
* `TELOXIDE_TOKEN` (required): this is the token of your bot obtain from
[BotFather](https://telegram.me/BotFather).
* `HOST` (required): the name of the host that is going to host the bot.
* `PORT`: the port of the HTTP server. By default it's 8080 if the `tls` feature
is disabled, 443 when enabled (see below for information about `tls`).
* `RUST_LOG`: the log level for `tracing` crate.
* `USE_POLLING`: force polling instead of websockets to interact with Telegram
APIs.### Using TLS
You can use TLS instead of unencrypted HTTP enabling the `tls` feature. If you
do so, the default port is changed to 443 and you need to specify two more
environment variables:* `SSL_CERT`: the path to the full chain certificate file in PEM format.
* `SSL_KEY`: the path to the private key file in PEM format.### Deploy to fly.io
This repo contains the bare minimum to deploy the service to
[fly.io](https://fly.io). You need to [perform a basic setup]
(https://fly.io/docs/languages-and-frameworks/dockerfile/) in order to select
the app you are going to deploy. Moreover, you also need to config the `HOST`
and `TELOXIDE_TOKEN` secrets before running `fly deploy`.