Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ah-dark/call-the-police-bot
A Telegram Bot that helps you call the police
https://github.com/ah-dark/call-the-police-bot
opentelemetry rust telegram-bot teloxide
Last synced: 2 months ago
JSON representation
A Telegram Bot that helps you call the police
- Host: GitHub
- URL: https://github.com/ah-dark/call-the-police-bot
- Owner: AH-dark
- License: agpl-3.0
- Created: 2024-05-05T23:18:28.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T05:13:28.000Z (4 months ago)
- Last Synced: 2024-10-09T19:23:27.393Z (2 months ago)
- Topics: opentelemetry, rust, telegram-bot, teloxide
- Language: Rust
- Homepage:
- Size: 389 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Call The Police Bot
A telegram bot that helps you to call the police.
> It just for fun, don't be serious.
## Usage
- `/help` - Show help message
- `/callpolice` - Call the police, the bot will return a message with the emojis of a police car.## Run
Before you start, you need to create a bot on Telegram and get the token.
To prepare the environment, you need to install the Cargo and Rust compiler. You can install it
using [rustup](https://rustup.rs/).After that, you can clone the repository and run the bot.
### Configuration
We provide some environment variables to configure the bot:
- `TELOXIDE_TOKEN` - The token of the bot on Telegram
- `TELEGRAM_API_URL` - The URL of the Telegram API (default: `https://api.telegram.org`)
- `OTEL_TRACE_EXPORTER_ENDPOINT` - The endpoint of the OpenTelemetry exporter (default: `http://localhost:4317`)
- `OTEL_TRACE_EXPORTER` - The type of the OpenTelemetry exporter (default: `otlp_grpc`, available: `otlp_grpc`,
`otlp_http`)
- `OTEL_TRACE_SAMPLE_RATE` - The sample rate of the OpenTelemetry exporter (default: `1.0`)
- `OTEL_METRICS_EXPORTER` - The type of the OpenTelemetry metrics exporter (available: `prometheus`)
- `OTEL_METRICS_EXPORTER_ENDPOINT` - The endpoint of the OpenTelemetry metrics exporter (default: `localhost:9090`)
- `RUST_LOG` - The log level of the application (available: `trace`, `debug`, `info`, `warn`, `error`)## License
This project is licensed under the [GNU Affero General Public License v3.0](LICENSE).