mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +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`].
|
||||
///
|
||||
/// [`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
|
||||
pub fn commands_repl_with_listener<'a, Cmd, H, Fut, UL, ListenerE>(
|
||||
bot: Bot,
|
||||
|
|
|
@ -11,13 +11,12 @@ use std::{future::Future, sync::Arc};
|
|||
/// A [REPL] for messages.
|
||||
///
|
||||
/// # Caution
|
||||
/// **DO NOT** use this function together with [`Dispatcher`] and
|
||||
/// [`commands_repl`], because Telegram disallow multiple requests at the same
|
||||
/// time from the same bot.
|
||||
/// **DO NOT** use this function together with [`Dispatcher`] and other REPLs,
|
||||
/// because Telegram disallow multiple requests at the same time from the same
|
||||
/// bot.
|
||||
///
|
||||
/// [REPL]: https://en.wikipedia.org/wiki/Read-eval-print_loop
|
||||
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
||||
/// [`commands_repl`]: crate::dispatching::commands_repl
|
||||
pub async fn repl<H, Fut>(bot: Bot, handler: H)
|
||||
where
|
||||
H: Fn(UpdateWithCx<Message>) -> Fut + Send + Sync + 'static,
|
||||
|
|
Loading…
Reference in a new issue