create /setliteral command
This commit is contained in:
parent
5bc6a8343d
commit
da1940cf23
15
src/admin.rs
15
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(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user