Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Feb 27, 2024
1 parent d414121 commit f23d3cd
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 38 deletions.
2 changes: 1 addition & 1 deletion telers/src/types/chat_boost_updated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
14 changes: 7 additions & 7 deletions telers/src/types/chat_member_administrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>,
/// `true`, if the administrator can edit messages of other users and can pin messages; channels only
pub can_edit_messages: Option<bool>,
/// `true`, if the user is allowed to pin messages; groups and supergroups only
pub can_pin_messages: Option<bool>,
/// `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<bool>,
/// `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<bool>,
/// `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<bool>,
/// `true`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
pub can_manage_topics: Option<bool>,
Expand Down
1 change: 1 addition & 0 deletions telers/src/types/contact.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use serde::Deserialize;

/// This object represents a phone contact.
/// # Documentation
/// <https://core.telegram.org/bots/api#contact>
#[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize)]
pub struct Contact {
Expand Down
1 change: 1 addition & 0 deletions telers/src/types/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<token>/<file_path>`. 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
/// <https://core.telegram.org/bots/api#file>
#[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize)]
pub struct File {
Expand Down
2 changes: 1 addition & 1 deletion telers/src/types/force_reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
/// 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<bool>,
}

Expand Down
1 change: 1 addition & 0 deletions telers/src/types/game_high_score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://core.telegram.org/bots/faq>` **Bot FAQ »**
/// # Documentation
/// <https://core.telegram.org/bots/api#gamehighscore>
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Deserialize)]
pub struct GameHighScore {}
2 changes: 1 addition & 1 deletion telers/src/types/giveaway_winners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion telers/src/types/inline_keyboard_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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=<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=<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<String>,
/// 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<String>,
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_keyboard_markup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinekeyboardmarkup>
#[derive(Debug, Default, Clone, Hash, PartialEq, Eq, Deserialize, Serialize)]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultaudio>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_cached_audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultcachedaudio>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_cached_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultcacheddocument>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_contact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultcontact>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultdocument>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultlocation>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_venue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultvenue>
#[skip_serializing_none]
Expand Down
2 changes: 0 additions & 2 deletions telers/src/types/inline_query_result_voice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#inlinequeryresultvoice>
#[skip_serializing_none]
Expand Down
6 changes: 1 addition & 5 deletions telers/src/types/keyboard_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// <https://core.telegram.org/bots/api#keyboardbutton>
#[skip_serializing_none]
Expand Down
4 changes: 2 additions & 2 deletions telers/src/types/link_preview_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub struct LinkPreviewOptions {
pub is_disabled: Option<bool>,
/// URL to use for the link preview. If empty, then the first URL found in the message text will be used
pub url: Option<String>,
/// `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<bool>,
/// `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<bool>,
/// `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<bool>,
Expand Down
3 changes: 2 additions & 1 deletion telers/src/types/reply_keyboard_markup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pub struct ReplyKeyboardMarkup {
pub one_time_keyboard: Option<bool>,
/// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters
pub input_field_placeholder: Option<String>,
/// 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<bool>,
}

Expand Down
1 change: 0 additions & 1 deletion telers/src/types/web_app_user.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use serde::Deserialize;

/// This object contains the data of the Mini App user.
/// # Documentation
/// <https://core.telegram.org/bots/webapps#webappuser>
#[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize)]
pub struct WebAppUser {
Expand Down

0 comments on commit f23d3cd

Please sign in to comment.