From c61e3eb8d30c25bd17bcc29ac66d1324c8426640 Mon Sep 17 00:00:00 2001 From: p0lunin Date: Fri, 3 Jul 2020 20:00:05 +0300 Subject: [PATCH] fix example --- examples/admin_bot/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/admin_bot/src/main.rs b/examples/admin_bot/src/main.rs index bc14766a..9010dfb7 100644 --- a/examples/admin_bot/src/main.rs +++ b/examples/admin_bot/src/main.rs @@ -1,7 +1,7 @@ // TODO: simplify this and use typed command variants (see https://github.com/teloxide/teloxide/issues/152). use teloxide::{ - prelude::*, types::ChatPermissions, utils::command::BotCommand, + prelude::*, types::ChatPermissions, utils::command::BotCommand }; use futures::future; @@ -64,7 +64,7 @@ fn parse_time_restrict(args: &[String]) -> Result { calc_restrict_time(num, unit) } -type Cx = DispatcherHandlerCx; +type Cx = UpdateWithCx; // Mute a user with a replied message. async fn mute_user(cx: &Cx, args: &[String]) -> ResponseResult<()> { @@ -158,7 +158,7 @@ async fn ban_user(cx: &Cx, args: &[String]) -> ResponseResult<()> { } async fn action( - cx: DispatcherHandlerCx, + cx: UpdateWithCx, command: Command, args: &[String], ) -> ResponseResult<()> {