Skip to content

Dialogues #955

Answered by TheAwiteb
Lucky-49 asked this question in Q&A
Oct 12, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

First of all, revoke your bot token from botfather, don't publish it again, because through it you can fully control the bot.

You already has a message filter, so it will filter all the coming messages, and the one you created will not be considered. So you must add your new cases to it like this

let message_handler = Update::filter_message()
    .branch(command_handler)
    .branch(case![State::ReceiveFullName].endpoint(receive_full_name))
    .branch(case![State::ReceiveFullName2].endpoint(receive_full_name_2))
    .branch(case![State::AnotherState].endpoint(another_state))
    .branch(dptree::endpoint(invalid_state));

And remove your new handler, also you need to await the send message…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lucky-49
Comment options

Answer selected by Lucky-49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants