mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 11:43:57 +01:00
Update src/bot/mod.rs
Co-authored-by: Temirkhan Myrzamadi <hirrolot@gmail.com>
This commit is contained in:
parent
cf3cd63c92
commit
114d1c3efb
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||||
/// # };
|
/// # };
|
||||||
/// ```
|
/// ```
|
||||||
|
|
Loading…
Reference in a new issue