rust-tg-bot-raw 1.0.0-rc.1

Pure Telegram Bot API types and methods for Rust -- a faithful port of python-telegram-bot's core layer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

/// Describes why a request was unsuccessful.
///
/// Corresponds to the Bot API
/// [`ResponseParameters`](https://core.telegram.org/bots/api#responseparameters) object.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ResponseParameters {
    /// The group has been migrated to a supergroup with the specified identifier.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub migrate_to_chat_id: Option<i64>,

    /// In case of exceeding flood control, the number of seconds left to wait
    /// before the request can be repeated.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub retry_after: Option<i64>,
}