Crates.io | TeleApi |
lib.rs | TeleApi |
version | 0.1.4 |
source | src |
created_at | 2023-11-15 18:00:30.461734 |
updated_at | 2023-11-18 19:58:27.219752 |
description | A package for help telegram bots programmers |
homepage | |
repository | |
max_upload_size | |
id | 1036634 |
size | 9,278 |
Example for use
use TeleApi;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let bot = TeleApi::TeleApi::new(""); // Telegram bot token
let chat_id: i64 = 123456789;
let text = "Hi TeleApi";
bot.sendMessage(params!("chat_id" => chat_id, "text" => text)).await?;
Ok(())
}