Skip to main content

Crate telegram_notify

Crate telegram_notify 

Source
Expand description

Tiny async Telegram notification crate.

This crate provides a minimal send API for sending Telegram bot messages to a single configured chat.

§Environment variables

  • TELEGRAM_BOT_TOKEN
  • TELEGRAM_CHAT_ID

§Example

use telegram_notify::send;

#[tokio::main]
async fn main() -> Result<(), telegram_notify::NotifyError> {
    send("trade executed").await?;
    Ok(())
}

Enums§

NotifyError
Errors returned by this crate.

Functions§

send
Sends a plain text Telegram message to the configured chat.