create /setliteral command

This commit is contained in:
Akulij 2025-05-02 17:08:32 +03:00
parent 5bc6a8343d
commit da1940cf23

View File

@ -29,6 +29,8 @@ pub enum AdminCommands {
Deop, Deop,
/// Send command and then click button to edits text in it /// Send command and then click button to edits text in it
EditButton, EditButton,
/// Set specified literal value
SetLiteral { literal: String },
} }
pub async fn admin_command_handler( pub async fn admin_command_handler(
@ -78,6 +80,19 @@ pub async fn admin_command_handler(
.await?; .await?;
Ok(()) 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(())
}
} }
} }