extend answer_message with LiteralAlternatives in new function
answer_message_variant
This commit is contained in:
parent
12567a6b97
commit
92b43aed65
11
src/main.rs
11
src/main.rs
@ -732,6 +732,17 @@ async fn answer_message<RM: Into<ReplyMarkup>>(
|
|||||||
db: &mut DB,
|
db: &mut DB,
|
||||||
literal: &str,
|
literal: &str,
|
||||||
keyboard: Option<RM>,
|
keyboard: Option<RM>,
|
||||||
|
) -> BotResult<()> {
|
||||||
|
answer_message_varianted(bot, chat_id, db, literal, None, keyboard).await
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn answer_message_varianted<RM: Into<ReplyMarkup>>(
|
||||||
|
bot: &Bot,
|
||||||
|
chat_id: i64,
|
||||||
|
db: &mut DB,
|
||||||
|
literal: &str,
|
||||||
|
variant: Option<&str>,
|
||||||
|
keyboard: Option<RM>,
|
||||||
) -> BotResult<()> {
|
) -> BotResult<()> {
|
||||||
let text = db
|
let text = db
|
||||||
.get_literal_value(literal)
|
.get_literal_value(literal)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user