Added shitty 3rd option
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -22,6 +22,7 @@ async fn main() {
|
||||
if let UpdateKind::InlineQuery(query) = update.kind {
|
||||
let mut option1 = String::new();
|
||||
let mut option2 = String::new();
|
||||
let mut option3 = String::new();
|
||||
if query.query == "" {
|
||||
api.send(query.answer(vec![])).await.ok();
|
||||
continue;
|
||||
@@ -37,7 +38,10 @@ async fn main() {
|
||||
option1.push(letter.to_lowercase().next().unwrap());
|
||||
option2.push(letter.to_uppercase().next().unwrap());
|
||||
}
|
||||
option3.push(letter);
|
||||
option3.push(' ');
|
||||
}
|
||||
option3.pop();
|
||||
}
|
||||
|
||||
api.send(query.answer(vec![
|
||||
@@ -55,6 +59,13 @@ async fn main() {
|
||||
disable_web_page_preview: false,
|
||||
}
|
||||
).into(),
|
||||
InlineQueryResultArticle::new(
|
||||
"3", option3.clone(), InputTextMessageContent {
|
||||
message_text: option3,
|
||||
parse_mode: None,
|
||||
disable_web_page_preview: false,
|
||||
}
|
||||
).into(),
|
||||
])).await.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user