Function teloxide::commands_repl_with_listener[][src]

pub async fn commands_repl_with_listener<'a, R, Cmd, H, Fut, L, ListenerE, HandlerE, N>(
    requester: R,
    bot_name: N,
    handler: H,
    listener: L
) where
    Cmd: BotCommand + Send + 'static,
    H: Fn(UpdateWithCx<R, Message>, Cmd) -> Fut + Send + Sync + 'static,
    Fut: Future<Output = Result<(), HandlerE>> + Send + 'static,
    L: UpdateListener<ListenerE> + Send + 'a,
    ListenerE: Debug + Send + 'a,
    Result<(), HandlerE>: OnError<HandlerE>,
    HandlerE: Debug + Send,
    N: Into<String> + Send + 'static,
    R: Requester + Clone + Send + 'static, 
Expand description

Like commands_repl, but with a custom UpdateListener.

All errors from an update listener and 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.