From 2849c1cbdef3810944ea74c6cf80f99c5fd089dd Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Thu, 30 Jul 2020 23:52:10 +0600 Subject: [PATCH] Fix the docs of REPLs --- src/dispatching/commands_repl.rs | 8 +++++++- src/dispatching/repl.rs | 7 +++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/dispatching/commands_repl.rs b/src/dispatching/commands_repl.rs index c4f0f89d..dd6964b7 100644 --- a/src/dispatching/commands_repl.rs +++ b/src/dispatching/commands_repl.rs @@ -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, diff --git a/src/dispatching/repl.rs b/src/dispatching/repl.rs index 31577939..5c3bf7e8 100644 --- a/src/dispatching/repl.rs +++ b/src/dispatching/repl.rs @@ -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(bot: Bot, handler: H) where H: Fn(UpdateWithCx) -> Fut + Send + Sync + 'static,