mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +01:00
ProductChosen
=> ReceiveProductChoice
This commit is contained in:
parent
a60e19a8c2
commit
bc0e9b19a4
1 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ type HandlerResult = Result<(), Box<dyn std::error::Error + Send + Sync>>;
|
||||||
pub enum State {
|
pub enum State {
|
||||||
Start,
|
Start,
|
||||||
ReceiveFullName,
|
ReceiveFullName,
|
||||||
ProductChosen { full_name: String },
|
ReceiveProductChoice { full_name: String },
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for State {
|
impl Default for State {
|
||||||
|
@ -60,7 +60,7 @@ async fn main() {
|
||||||
)
|
)
|
||||||
.branch(
|
.branch(
|
||||||
Update::filter_callback_query().chain(
|
Update::filter_callback_query().chain(
|
||||||
teloxide::handler![State::ProductChosen { full_name }]
|
teloxide::handler![State::ReceiveProductChoice { full_name }]
|
||||||
.endpoint(receive_product_selection),
|
.endpoint(receive_product_selection),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -107,7 +107,7 @@ async fn receive_full_name(
|
||||||
);
|
);
|
||||||
|
|
||||||
bot.send_message(msg.chat.id, "Select a product:").reply_markup(products).await?;
|
bot.send_message(msg.chat.id, "Select a product:").reply_markup(products).await?;
|
||||||
dialogue.update(State::ProductChosen { full_name }).await?;
|
dialogue.update(State::ReceiveProductChoice { full_name }).await?;
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
bot.send_message(msg.chat.id, "Please, send me your full name.").await?;
|
bot.send_message(msg.chat.id, "Please, send me your full name.").await?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue