From da1940cf2392ae89217d7d31b4ab173a2cf0148b Mon Sep 17 00:00:00 2001 From: Akulij Date: Fri, 2 May 2025 17:08:32 +0300 Subject: [PATCH] create /setliteral command --- src/admin.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/admin.rs b/src/admin.rs index 9fd0b77..fdbb814 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -29,6 +29,8 @@ pub enum AdminCommands { Deop, /// Send command and then click button to edits text in it EditButton, + /// Set specified literal value + SetLiteral { literal: String }, } pub async fn admin_command_handler( @@ -78,6 +80,19 @@ pub async fn admin_command_handler( .await?; Ok(()) } + AdminCommands::SetLiteral { literal } => { + dialogue + .update(State::Edit { + literal, + lang: "ru".to_string(), + is_caption_set: false, + }) + .await?; + bot.send_message(msg.chat.id, "Send message for literal") + .await?; + + Ok(()) + } } }