telexide_fork/model/
user.rs

1use super::PhotoSize;
2use serde::{Deserialize, Serialize};
3
4/// This object represents a Telegram user or bot.
5#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
6pub struct User {
7    /// Unique identifier for this user or bot
8    pub id: i64,
9    /// True, if this user is a bot
10    pub is_bot: bool,
11    /// User‘s or bot’s first name
12    pub first_name: String,
13    /// User‘s or bot’s last name
14    pub last_name: Option<String>,
15    /// User‘s or bot’s username
16    pub username: Option<String>,
17    /// [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the user's language
18    pub language_code: Option<String>,
19    /// True, if the bot can be invited to groups. Returned only in [`get_me`].
20    ///
21    /// [`get_me`]: ../api/struct.API.html#method.get_me
22    pub can_join_groups: Option<bool>,
23    /// True, if privacy mode is disabled for the bot. Returned only in
24    /// [`get_me`].
25    ///
26    /// [`get_me`]: ../api/struct.API.html#method.get_me
27    pub can_read_all_group_messages: Option<bool>,
28    /// True, if the bot supports inline queries. Returned only in [`get_me`].
29    ///
30    /// [`get_me`]: ../api/struct.API.html#method.get_me
31    pub supports_inline_queries: Option<bool>,
32}
33
34/// This object represent a user's profile pictures.
35#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
36pub struct UserProfilePhotos {
37    /// Total number of profile pictures the target user has
38    pub total_count: i64,
39    /// Requested profile pictures (in up to 4 sizes each)
40    pub photos: Vec<Vec<PhotoSize>>,
41}