From eb45ac7d884488e158a07e2bf0637d70dfbf31bc Mon Sep 17 00:00:00 2001 From: Waffle Date: Fri, 27 Nov 2020 01:39:35 +0300 Subject: [PATCH] Fix doc links --- src/bot/api.rs | 79 ----------------------------------- src/requests/requester_ext.rs | 27 ++++++------ 2 files changed, 15 insertions(+), 91 deletions(-) diff --git a/src/bot/api.rs b/src/bot/api.rs index 9bebc7bb..9facaba9 100644 --- a/src/bot/api.rs +++ b/src/bot/api.rs @@ -119,12 +119,6 @@ impl Bot { /// - `chat_id`: Unique identifier for the target chat or username of the /// target supergroup or channel (in the format `@channelusername`). /// - `text`: Text of the message to be sent. - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_message(&self, chat_id: C, text: T) -> SendMessage where C: Into, @@ -179,12 +173,6 @@ impl Bot { /// [`InputFile::FileId`]: crate::types::InputFile::FileId /// /// [More info on Sending Files »]: https://core.telegram.org/bots/api#sending-files - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_photo(&self, chat_id: C, photo: InputFile) -> SendPhoto where C: Into, @@ -197,12 +185,6 @@ impl Bot { /// # Params /// - `chat_id`: Unique identifier for the target chat or username of the /// target supergroup or channel (in the format `@channelusername`). - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_audio(&self, chat_id: C, audio: InputFile) -> SendAudio where C: Into, @@ -228,12 +210,6 @@ impl Bot { /// `multipart/form-data`. [More info on Sending Files »]. /// /// [More info on Sending Files »]: https://core.telegram.org/bots/api#sending-files - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_document(&self, chat_id: C, document: InputFile) -> SendDocument where C: Into, @@ -262,12 +238,6 @@ impl Bot { /// [`InputFile::File`]: crate::types::InputFile::File /// [`InputFile::Url`]: crate::types::InputFile::Url /// [`InputFile::FileId`]: crate::types::InputFile::FileId - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_video(&self, chat_id: C, video: InputFile) -> SendVideo where C: Into, @@ -287,12 +257,6 @@ impl Bot { /// - `chat_id`: Unique identifier for the target chat or username of the /// target supergroup or channel (in the format `@channelusername`). /// - `animation`: Animation to send. - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_animation(&self, chat_id: C, animation: InputFile) -> SendAnimation where C: Into, @@ -327,12 +291,6 @@ impl Bot { /// [`InputFile::Url`]: crate::types::InputFile::Url /// [`InputFile::FileId`]: crate::types::InputFile::FileId /// [More info on Sending Files »]: https://core.telegram.org/bots/api#sending-files - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn send_voice(&self, chat_id: C, voice: InputFile) -> SendVoice where C: Into, @@ -546,16 +504,6 @@ impl Bot { /// - `question`: Poll question, 1-255 characters. /// - `options`: List of answer options, 2-10 strings 1-100 characters /// each. - /// - /// # Notes - /// Uses [a default parse mode] ([`SendPoll::explanation_parse_mode`]) if - /// specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder - /// [`SendPoll::explanation_parse_mode`]: - /// [`SendPoll::explanation_parse_mode`]: - /// crate::types::SendPoll::explanation_parse_mode pub fn send_poll(&self, chat_id: C, question: Q, options: O) -> SendPoll where C: Into, @@ -1033,13 +981,6 @@ impl Bot { /// target channel (in the format `@channelusername`). /// - `message_id`: Identifier of the message to edit. /// - `text`: New text of the message. - /// - /// # Notes - /// - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn edit_message_text(&self, chat_id: C, message_id: i32, text: T) -> EditMessageText where C: Into, @@ -1060,13 +1001,6 @@ impl Bot { /// /// - `inline_message_id`: Identifier of the inline message. /// - `text`: New text of the message. - /// - /// # Notes - /// - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn edit_inline_message_text( &self, inline_message_id: I, @@ -1086,13 +1020,6 @@ impl Bot { /// [The official docs](https://core.telegram.org/bots/api#editmessagecaption). /// /// [`True`]: crate::types::True - /// - /// # Notes - /// - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn edit_message_caption(&self, chat_id: C, message_id: i32) -> EditMessageCaption where C: Into, @@ -1107,12 +1034,6 @@ impl Bot { /// [The official docs](https://core.telegram.org/bots/api#editmessagecaption). /// /// [`True`]: crate::types::True - /// - /// # Notes - /// Uses [a default parse mode] if specified in [`BotBuilder`]. - /// - /// [a default parse mode]: crate::BotBuilder::parse_mode - /// [`BotBuilder`]: crate::BotBuilder pub fn edit_inline_message_caption(&self, inline_message_id: I) -> EditInlineMessageCaption where I: Into, diff --git a/src/requests/requester_ext.rs b/src/requests/requester_ext.rs index f819b0f3..57ef9a52 100644 --- a/src/requests/requester_ext.rs +++ b/src/requests/requester_ext.rs @@ -60,18 +60,21 @@ pub trait RequesterExt: Requester { /// - [`edit_message_text`] (and [`edit_message_text_inline`]) /// - [`edit_message_caption`] (and [`edit_message_caption_inline`]) /// - /// [`send_message`]: crate::Requester::send_message - /// [`send_photo`]: crate::Requester::send_photo - /// [`send_video`]: crate::Requester::send_video - /// [`send_audio`]: crate::Requester::send_audio - /// [`send_document`]: crate::Requester::send_document - /// [`send_animation`]: crate::Requester::send_animation - /// [`send_voice`]: crate::Requester::send_voice - /// [`send_poll`]: crate::Requester::send_poll - /// [`edit_message_text`]: crate::Requester::edit_message_text - /// [`edit_message_text`]: crate::Requester::edit_message_text_inline - /// [`edit_message_caption`]: crate::Requester::edit_message_caption - /// [`edit_message_caption`]: crate::Requester::edit_message_caption_inline + /// [`send_message`]: crate::requests::Requester::send_message + /// [`send_photo`]: crate::requests::Requester::send_photo + /// [`send_video`]: crate::requests::Requester::send_video + /// [`send_audio`]: crate::requests::Requester::send_audio + /// [`send_document`]: crate::requests::Requester::send_document + /// [`send_animation`]: crate::requests::Requester::send_animation + /// [`send_voice`]: crate::requests::Requester::send_voice + /// [`send_poll`]: crate::requests::Requester::send_poll + /// [`edit_message_text`]: crate::requests::Requester::edit_message_text + /// [`edit_message_text_inline`]: + /// crate::requests::Requester::edit_message_text_inline + /// [`edit_message_caption`]: + /// crate::requests::Requester::edit_message_caption + /// [`edit_message_caption_inline`]: + /// crate::requests::Requester::edit_message_caption_inline fn parse_mode(self, parse_mode: ParseMode) -> DefaultParseMode where Self: Sized,