create /cancel admin command
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m4s

This commit is contained in:
Akulij 2025-05-05 18:46:05 +03:00
parent f6adaea70c
commit c2aebcd509

View File

@ -39,6 +39,8 @@ pub enum AdminCommands {
SetChat,
/// Shows user count and lists some of them
Users,
/// Cancel current action and sets user state to default
Cancel,
}
pub async fn admin_command_handler(
@ -148,6 +150,12 @@ pub async fn admin_command_handler(
Ok(())
}
AdminCommands::Cancel => {
dialogue.exit().await?;
bot.send_message(msg.chat.id, "canceled current action")
.await?;
Ok(())
}
}
}