Struct telebot::bot::Bot [] [src]

pub struct Bot {
    pub key: String,
    pub handle: Handle,
    pub last_id: Cell<u32>,
    pub update_interval: Cell<u64>,
    pub handlers: RefCell<HashMap<String, UnboundedSender<(RcBot, Message)>>>,
    pub session: Session,
}

The main bot structure

Fields

Methods

impl Bot
[src]

[src]

[src]

Creates a new request and adds a JSON message to it. The returned Future contains a the reply as a string. This method should be used if no file is added because a JSON msg is always compacter than a formdata one.

[src]

Creates a new request with some byte content (e.g. a file). The method properties have to be in the formdata setup and cannot be sent as JSON.

[src]

calls cURL and parses the result for an error