mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
fix example
This commit is contained in:
parent
13c1e041ac
commit
c61e3eb8d3
1 changed files with 3 additions and 3 deletions
|
@ -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<i32, &str> {
|
|||
calc_restrict_time(num, unit)
|
||||
}
|
||||
|
||||
type Cx = DispatcherHandlerCx<Message>;
|
||||
type Cx = UpdateWithCx<Message>;
|
||||
|
||||
// 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<Message>,
|
||||
cx: UpdateWithCx<Message>,
|
||||
command: Command,
|
||||
args: &[String],
|
||||
) -> ResponseResult<()> {
|
||||
|
|
Loading…
Reference in a new issue