mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-25 01:25:12 +01:00
Fix the docs of REPLs
This commit is contained in:
parent
1ab789fd71
commit
2849c1cbde
2 changed files with 10 additions and 5 deletions
|
@ -43,7 +43,13 @@ where
|
||||||
|
|
||||||
/// Like [`commands_repl`], but with a custom [`UpdateListener`].
|
/// Like [`commands_repl`], but with a custom [`UpdateListener`].
|
||||||
///
|
///
|
||||||
/// [`commands_repl`]: crate::dispatching::commands_repl
|
/// # Caution
|
||||||
|
/// **DO NOT** use this function together with [`Dispatcher`] and other REPLs,
|
||||||
|
/// because Telegram disallow multiple requests at the same time from the same
|
||||||
|
/// bot.
|
||||||
|
///
|
||||||
|
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
||||||
|
/// [`commands_repl`]: crate::dispatching::commands_repl()
|
||||||
/// [`UpdateListener`]: crate::dispatching::update_listeners::UpdateListener
|
/// [`UpdateListener`]: crate::dispatching::update_listeners::UpdateListener
|
||||||
pub fn commands_repl_with_listener<'a, Cmd, H, Fut, UL, ListenerE>(
|
pub fn commands_repl_with_listener<'a, Cmd, H, Fut, UL, ListenerE>(
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
|
|
@ -11,13 +11,12 @@ use std::{future::Future, sync::Arc};
|
||||||
/// A [REPL] for messages.
|
/// A [REPL] for messages.
|
||||||
///
|
///
|
||||||
/// # Caution
|
/// # Caution
|
||||||
/// **DO NOT** use this function together with [`Dispatcher`] and
|
/// **DO NOT** use this function together with [`Dispatcher`] and other REPLs,
|
||||||
/// [`commands_repl`], because Telegram disallow multiple requests at the same
|
/// because Telegram disallow multiple requests at the same time from the same
|
||||||
/// time from the same bot.
|
/// bot.
|
||||||
///
|
///
|
||||||
/// [REPL]: https://en.wikipedia.org/wiki/Read-eval-print_loop
|
/// [REPL]: https://en.wikipedia.org/wiki/Read-eval-print_loop
|
||||||
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
||||||
/// [`commands_repl`]: crate::dispatching::commands_repl
|
|
||||||
pub async fn repl<H, Fut>(bot: Bot, handler: H)
|
pub async fn repl<H, Fut>(bot: Bot, handler: H)
|
||||||
where
|
where
|
||||||
H: Fn(UpdateWithCx<Message>) -> Fut + Send + Sync + 'static,
|
H: Fn(UpdateWithCx<Message>) -> Fut + Send + Sync + 'static,
|
||||||
|
|
Loading…
Add table
Reference in a new issue