Need help with telegram-bot?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

782 Stars 146 Forks MIT License 612 Commits 51 Opened issues


Rust Library for creating a Telegram Bot

Services available


Need anything else?

Contributors list

Rust Telegram Bot Library

Build Status Tests Tests License

Documentation: Latest version master

A library for writing your own Telegram bots. More information here. Official API here.


Here is a simple example (see


use std::env;

use futures::StreamExt; use telegram_bot::*;

#[tokio::main] async fn main() -> Result { let token = env::var("TELEGRAM_BOT_TOKEN").expect("TELEGRAM_BOT_TOKEN not set"); let api = Api::new(token);

// Fetch new updates via long poll method
let mut stream =;
while let Some(update) = {
    // If the received update contains a new message...
    let update = update?;
    if let UpdateKind::Message(message) = update.kind {
        if let MessageKind::Text { ref data, .. } = message.kind {
            // Print received text message to stdout.
            println!(": {}", &message.from.first_name, data);

            // Answer message with "Hi".
                "Hi, {}! You just wrote '{}'",
                &message.from.first_name, data


You can find a bigger examples in the



This library is available via
. In order to use it, just add this to your
telegram-bot = "0.7"

The library allows you to do E2E-testing of your bot easily: just specify

environment variable to point to your fake Telegram test server. A lot of diagnostic information can be collected with tracing framework, see


Yes please! Every type of contribution is welcome: Create issues, hack some code or make suggestions. Don't know where to start? Good first issues are tagged with up for grab.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.