Function teloxide::dialogues_repl_with_listener[][src]

pub async fn dialogues_repl_with_listener<'a, R, H, D, Fut, L, ListenerE>(
    requester: R,
    handler: H,
    listener: L
) where
    H: Fn(UpdateWithCx<R, Message>, D) -> Fut + Send + Sync + 'static,
    D: Clone + Default + Send + 'static,
    Fut: Future<Output = DialogueStage<D>> + Send + 'static,
    L: UpdateListener<ListenerE> + Send + 'a,
    ListenerE: Debug + Send + 'a,
    R: Requester + Send + Clone + 'static, 
Expand description

Like dialogues_repl, but with a custom UpdateListener.

All errors from an update listener and handler will be logged. This function uses InMemStorage.

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.