Telebot - Telegram Bot Library in Rust
This library allows you to write a Telegram Bot in Rust. It's an almost complete wrapper for the Telegram Bot API and uses tokio-curl to send a request to the Telegram server. Each Telegram function call returns a future.
Usage
Add this to your Cargo.toml
[]
= "0.0.3"
Find a Telegram function in the source code
All available functions are listed in src/functions.rs. For example consider sendLocation:
/// Use this method to send point on the map. On success, the sent Message is returned.
The field "bot_function" defines the name of the function in the local API. Each optional field in the struct can be changed by calling the function with the name of the field.
So for example to send the location of Paris to chat 432432 silently: bot.location(432432, 48.8566, 2.3522).disable_notification(true).send()
Example
extern crate telebot;
extern crate tokio_core;
extern crate futures;
use bot;
use Core;
use Stream;
use Future;
use File;
// import all available functions
use *;