create /cancel admin command
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m4s
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m4s
This commit is contained in:
parent
f6adaea70c
commit
c2aebcd509
@ -39,6 +39,8 @@ pub enum AdminCommands {
|
|||||||
SetChat,
|
SetChat,
|
||||||
/// Shows user count and lists some of them
|
/// Shows user count and lists some of them
|
||||||
Users,
|
Users,
|
||||||
|
/// Cancel current action and sets user state to default
|
||||||
|
Cancel,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn admin_command_handler(
|
pub async fn admin_command_handler(
|
||||||
@ -148,6 +150,12 @@ pub async fn admin_command_handler(
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
AdminCommands::Cancel => {
|
||||||
|
dialogue.exit().await?;
|
||||||
|
bot.send_message(msg.chat.id, "canceled current action")
|
||||||
|
.await?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user