mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
fix repls
This commit is contained in:
parent
a644d0b6d2
commit
4452631fcc
2 changed files with 4 additions and 4 deletions
|
@ -77,7 +77,7 @@ pub async fn commands_repl_with_listener<'a, R, Cmd, H, L, ListenerE, N, E, Args
|
|||
{
|
||||
let bot_name = bot_name.into();
|
||||
|
||||
let dispatcher = Dispatcher::new(Arc::new(requester))
|
||||
let dispatcher = Dispatcher::new(requester)
|
||||
.messages_handler(|h| h.add_command::<Cmd>(bot_name).branch(dptree::endpoint(handler)));
|
||||
|
||||
#[cfg(feature = "ctrlc_handler")]
|
||||
|
|
|
@ -59,11 +59,11 @@ pub async fn repl_with_listener<'a, R, H, E, L, ListenerE, Args>(
|
|||
ListenerE: Debug,
|
||||
Result<(), E>: OnError<E>,
|
||||
E: Debug + Send + Sync + 'static,
|
||||
R: Requester + Send + Sync + 'static,
|
||||
R: Requester + Clone + Send + Sync + 'static,
|
||||
{
|
||||
#[allow(unused_mut)]
|
||||
let mut dispatcher = Dispatcher::new(Arc::new(requester))
|
||||
.messages_handler(|h| h.branch(dptree::endpoint(handler)));
|
||||
let mut dispatcher =
|
||||
Dispatcher::new(requester).messages_handler(|h| h.branch(dptree::endpoint(handler)));
|
||||
|
||||
#[cfg(feature = "ctrlc_handler")]
|
||||
let mut dispatcher = dispatcher.setup_ctrlc_handler();
|
||||
|
|
Loading…
Reference in a new issue