diff --git a/telers/src/types/chat_boost_updated.rs b/telers/src/types/chat_boost_updated.rs index 29c152d..79db492 100644 --- a/telers/src/types/chat_boost_updated.rs +++ b/telers/src/types/chat_boost_updated.rs @@ -12,7 +12,7 @@ use serde::Deserialize; pub struct ChatBoostUpdated { /// Chat which was boosted pub chat: Chat, - /// Infomation about the chat boost + /// Information about the chat boost pub boost: ChatBoostSource, } diff --git a/telers/src/types/chat_member_administrator.rs b/telers/src/types/chat_member_administrator.rs index 7db40c9..a493148 100644 --- a/telers/src/types/chat_member_administrator.rs +++ b/telers/src/types/chat_member_administrator.rs @@ -14,31 +14,31 @@ pub struct ChatMemberAdministrator { pub can_be_edited: bool, /// `true`, if the user's presence in the chat is hidden pub is_anonymous: bool, - /// `true`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege + /// `true`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. pub can_manage_chat: bool, /// `true`, if the administrator can delete messages of other users pub can_delete_messages: bool, /// `true`, if the administrator can manage video chats pub can_manage_video_chats: bool, - /// `true`, if the administrator can restrict, ban or unban chat members + /// `true`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics pub can_restrict_members: bool, - /// `true`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) + /// `true`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user) pub can_promote_members: bool, /// `true`, if the user is allowed to change the chat title, photo and other settings pub can_change_info: bool, /// `true`, if the user is allowed to invite new users to the chat pub can_invite_users: bool, - /// `true`, if the administrator can post messages in the channel; channels only + /// `true`, if the administrator can post messages in the channel, or access channel statistics; channels only pub can_post_messages: Option, /// `true`, if the administrator can edit messages of other users and can pin messages; channels only pub can_edit_messages: Option, /// `true`, if the user is allowed to pin messages; groups and supergroups only pub can_pin_messages: Option, - /// `true`, if the administrator can post stories in the channel; channels only + /// `true`, if the administrator can post stories to the chat pub can_post_stories: Option, - /// `true`, if the administrator can edit stories posted by other users; channels only + /// `true`, if the administrator can edit stories posted by other users pub can_edit_stories: Option, - /// `true`, if the administrator can delete stories posted by other users; channels only + /// `true`, if the administrator can delete stories posted by other users pub can_delete_stories: Option, /// `true`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only pub can_manage_topics: Option, diff --git a/telers/src/types/contact.rs b/telers/src/types/contact.rs index f820844..e83f797 100644 --- a/telers/src/types/contact.rs +++ b/telers/src/types/contact.rs @@ -1,6 +1,7 @@ use serde::Deserialize; /// This object represents a phone contact. +/// # Documentation /// #[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize)] pub struct Contact { diff --git a/telers/src/types/file.rs b/telers/src/types/file.rs index f6a81e9..052ca2d 100644 --- a/telers/src/types/file.rs +++ b/telers/src/types/file.rs @@ -2,6 +2,7 @@ use serde::Deserialize; /// This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [`GetFile`](crate::methods::GetFile). /// The maximum file size to download is 20 MB +/// # Documentation /// #[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize)] pub struct File { diff --git a/telers/src/types/force_reply.rs b/telers/src/types/force_reply.rs index 9a5c8ec..fb03b16 100644 --- a/telers/src/types/force_reply.rs +++ b/telers/src/types/force_reply.rs @@ -15,7 +15,7 @@ pub struct ForceReply { pub force_reply: bool, /// The placeholder to be shown in the input field when the reply is active; 1-64 characters pub input_field_placeholder: Option, - /// Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the [`Message`](crate::types::Message) object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message. + /// Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the [`Message`](crate::types::Message) object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. pub selective: Option, } diff --git a/telers/src/types/game_high_score.rs b/telers/src/types/game_high_score.rs index 66c1ff3..de9cf0d 100644 --- a/telers/src/types/game_high_score.rs +++ b/telers/src/types/game_high_score.rs @@ -3,6 +3,7 @@ use serde::Deserialize; /// This object represents one row of the high scores table for a game. /// And that's about all we've got for now. /// If you've got any questions, please check out our `https://core.telegram.org/bots/faq ` **Bot FAQ ยป** +/// # Documentation /// #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Deserialize)] pub struct GameHighScore {} diff --git a/telers/src/types/giveaway_winners.rs b/telers/src/types/giveaway_winners.rs index 86d921f..2d58b85 100644 --- a/telers/src/types/giveaway_winners.rs +++ b/telers/src/types/giveaway_winners.rs @@ -9,7 +9,7 @@ use super::{Chat, User}; pub struct GiveawayWinners { /// The chat that created the giveaway pub chat: Chat, - /// Identifier of the messsage with the giveaway in the chat + /// Identifier of the message with the giveaway in the chat pub giveaway_message_id: i64, /// Point in time (Unix timestamp) when winners of the giveaway were selected pub winners_selection_date: i64, diff --git a/telers/src/types/inline_keyboard_button.rs b/telers/src/types/inline_keyboard_button.rs index ff4ae6f..5697d26 100644 --- a/telers/src/types/inline_keyboard_button.rs +++ b/telers/src/types/inline_keyboard_button.rs @@ -11,7 +11,7 @@ use serde_with::skip_serializing_none; pub struct InlineKeyboardButton { /// Label text on the button pub text: String, - /// HTTP or tg:// URL to be opened when the button is pressed. Links `tg://user?id=` can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. + /// HTTP or tg:// URL to be opened when the button is pressed. Links `tg://user?id=` can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings. pub url: Option, /// Data to be sent in a [`callback query`](https://core.telegram.org/bots/api#callbackquery) to the bot when button is pressed, 1-64 bytes pub callback_data: Option, diff --git a/telers/src/types/inline_keyboard_markup.rs b/telers/src/types/inline_keyboard_markup.rs index 366412f..a59ad9b 100644 --- a/telers/src/types/inline_keyboard_markup.rs +++ b/telers/src/types/inline_keyboard_markup.rs @@ -3,8 +3,6 @@ use super::InlineKeyboardButton; use serde::{Deserialize, Serialize}; /// This object represents an [`inline keyboard`](https://core.telegram.org/bots/features#inline-keyboards) that appears right next to the message it belongs to. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*. /// # Documentation /// #[derive(Debug, Default, Clone, Hash, PartialEq, Eq, Deserialize, Serialize)] diff --git a/telers/src/types/inline_query_result_audio.rs b/telers/src/types/inline_query_result_audio.rs index 0c9564e..4e28aba 100644 --- a/telers/src/types/inline_query_result_audio.rs +++ b/telers/src/types/inline_query_result_audio.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the audio. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_cached_audio.rs b/telers/src/types/inline_query_result_cached_audio.rs index 0670d31..8b06b82 100644 --- a/telers/src/types/inline_query_result_cached_audio.rs +++ b/telers/src/types/inline_query_result_cached_audio.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the audio. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_cached_document.rs b/telers/src/types/inline_query_result_cached_document.rs index 98949dd..77164a7 100644 --- a/telers/src/types/inline_query_result_cached_document.rs +++ b/telers/src/types/inline_query_result_cached_document.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the file. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_contact.rs b/telers/src/types/inline_query_result_contact.rs index d2aef13..9cdc663 100644 --- a/telers/src/types/inline_query_result_contact.rs +++ b/telers/src/types/inline_query_result_contact.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the contact. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_document.rs b/telers/src/types/inline_query_result_document.rs index ff68b9b..2b7fd03 100644 --- a/telers/src/types/inline_query_result_document.rs +++ b/telers/src/types/inline_query_result_document.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_location.rs b/telers/src/types/inline_query_result_location.rs index 0b52cc5..479b628 100644 --- a/telers/src/types/inline_query_result_location.rs +++ b/telers/src/types/inline_query_result_location.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the location. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_venue.rs b/telers/src/types/inline_query_result_venue.rs index 2ed1be7..c46a6c9 100644 --- a/telers/src/types/inline_query_result_venue.rs +++ b/telers/src/types/inline_query_result_venue.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the venue. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/inline_query_result_voice.rs b/telers/src/types/inline_query_result_voice.rs index b38bbe2..512ff32 100644 --- a/telers/src/types/inline_query_result_voice.rs +++ b/telers/src/types/inline_query_result_voice.rs @@ -4,8 +4,6 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; /// Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use `input_message_content` to send a message with the specified content instead of the the voice message. -/// # Notes -/// This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/keyboard_button.rs b/telers/src/types/keyboard_button.rs index cd4e1f2..2d96243 100644 --- a/telers/src/types/keyboard_button.rs +++ b/telers/src/types/keyboard_button.rs @@ -5,11 +5,7 @@ use super::{ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; -/// This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields `web_app`, `request_contact`, `request_location`, and `request_poll` are mutually exclusive. -/// # Notes -/// - `request_contact` and `request_location` options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*. -/// - `request_poll` option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*. -/// - `web_app` option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*. +/// This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields `web_app`, `request_users`, `request_chat`, `request_contact`, `request_location`, and `request_poll` are mutually exclusive. /// # Documentation /// #[skip_serializing_none] diff --git a/telers/src/types/link_preview_options.rs b/telers/src/types/link_preview_options.rs index c48c468..4f3299c 100644 --- a/telers/src/types/link_preview_options.rs +++ b/telers/src/types/link_preview_options.rs @@ -11,9 +11,9 @@ pub struct LinkPreviewOptions { pub is_disabled: Option, /// URL to use for the link preview. If empty, then the first URL found in the message text will be used pub url: Option, - /// `true`, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview + /// `true`, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview pub prefer_small_media: Option, - /// `true`, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview + /// `true`, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview pub prefer_large_media: Option, /// `true`, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text pub show_above_text: Option, diff --git a/telers/src/types/reply_keyboard_markup.rs b/telers/src/types/reply_keyboard_markup.rs index 04bdba8..c25f48b 100644 --- a/telers/src/types/reply_keyboard_markup.rs +++ b/telers/src/types/reply_keyboard_markup.rs @@ -19,7 +19,8 @@ pub struct ReplyKeyboardMarkup { pub one_time_keyboard: Option, /// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters pub input_field_placeholder: Option, - /// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the [`Message`](crate::types::Message) object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message. + /// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the [`Message`](crate::types::Message) object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. + /// Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. pub selective: Option, } diff --git a/telers/src/types/web_app_user.rs b/telers/src/types/web_app_user.rs index 82020d7..fb85a1c 100644 --- a/telers/src/types/web_app_user.rs +++ b/telers/src/types/web_app_user.rs @@ -1,7 +1,6 @@ use serde::Deserialize; /// This object contains the data of the Mini App user. -/// # Documentation /// #[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize)] pub struct WebAppUser {