Function teloxide::repl[][src]

pub async fn repl<R, H, Fut, E>(requester: R, handler: H) where
    H: Fn(UpdateWithCx<R, Message>) -> Fut + Send + Sync + 'static,
    Fut: Future<Output = Result<(), E>> + Send + 'static,
    Result<(), E>: OnError<E>,
    E: Debug + Send,
    R: Requester + Send + Clone + 'static,
    <R as Requester>::GetUpdatesFaultTolerant: Send

A REPL for messages.

All errors from an update listener and a handler will be logged.

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.