[−][src]Function teloxide::dialogues_repl_with_listener
pub async fn dialogues_repl_with_listener<'a, H, D, Fut, L, ListenerE>(
bot: Bot,
handler: H,
listener: L
) where
H: Fn(UpdateWithCx<Message>, D) -> Fut + Send + Sync + 'static,
D: Default + Send + 'static,
Fut: Future<Output = DialogueStage<D>> + Send + 'static,
L: UpdateListener<ListenerE> + Send + 'a,
ListenerE: Debug + Send + 'a,
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.