[−][src]Function teloxide::commands_repl
pub async fn commands_repl<Cmd, H, Fut, HandlerE>(
bot: Bot,
bot_name: &'static str,
handler: H
) where
Cmd: BotCommand + Send + 'static,
H: Fn(UpdateWithCx<Message>, Cmd) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<(), HandlerE>> + Send + 'static,
Result<(), HandlerE>: OnError<HandlerE>,
HandlerE: Debug + Send,
A REPL for commands.
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.