Update src/bot/mod.rs

Co-authored-by: Temirkhan Myrzamadi <hirrolot@gmail.com>
This commit is contained in:
Waffle Lapkin 2020-12-30 17:03:29 +03:00 committed by GitHub
parent cf3cd63c92
commit 114d1c3efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,10 +100,10 @@ impl Bot {
Self::with_client(&get_env(TELOXIDE_TOKEN), client) Self::with_client(&get_env(TELOXIDE_TOKEN), client)
} }
/// Sets custom api url. /// Sets a custom API URL.
/// ///
/// For example you can run your own [Telegram bot API server][tbas] and set /// For example, you can run your own [Telegram bot API server][tbas] and set
/// it's url using this method. /// its URL using this method.
/// ///
/// [tbas]: https://github.com/tdlib/telegram-bot-api /// [tbas]: https://github.com/tdlib/telegram-bot-api
/// ///
@ -116,10 +116,9 @@ impl Bot {
/// }; /// };
/// ///
/// # async { /// # async {
/// // Setup bot
/// let url = reqwest::Url::parse("https://localhost/tbas").unwrap(); /// let url = reqwest::Url::parse("https://localhost/tbas").unwrap();
/// let bot = Bot::new("TOKEN").set_api_url(url); /// let bot = Bot::new("TOKEN").set_api_url(url);
/// // All methods will use "https://localhost/tbas" as an api url /// // From now all methods will use "https://localhost/tbas" as an API URL.
/// bot.get_me().send().await /// bot.get_me().send().await
/// # }; /// # };
/// ``` /// ```