How to invoke callback_query_handler only in a particular State? #2102
Unanswered
Katrin-Atreides
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please answer these questions before submitting your issue. Thanks!
What version of pyTelegramBotAPI are you using?
4.14.0
What OS are you using?
Windows 10
What version of python are you using?
Python 3.12.0
Hi everyone! I am making a bot and currently I have started to try using States. I know that it is possible to use the state as a condition for a message_handler, like this:
But what i want to do is the same thing but with callback_query_handler. Basically, I just want my callback handler to only react to calls while user is in a particular state. But is it even possible? I couldn't find any examples or info online.
I expected something like this to work:
And it doesn't work at all. Would be nice to know if I can even do this)
Beta Was this translation helpful? Give feedback.
All reactions