Fix the docs of REPLs

This commit is contained in:
Temirkhan Myrzamadi 2020-07-30 23:52:10 +06:00
parent 1ab789fd71
commit 2849c1cbde
2 changed files with 10 additions and 5 deletions

View file

@ -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,

View file

@ -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,