Answer the question
In order to leave comments, you need to log in
How to assign a value to a variable from a callbackQuery handler?
@dp.callback_query_handler(text = 'cub')
async def send_message(call:CallbackQuery):
await call.message.edit_text('What's your bet?!')
await call.message.edit_reply_markup(reply_markup = nav.back)
game_stavka = int(call.text)
print(game_stavka)
I have a piece of code like this, which, according to my idea, should return what the user entered. but it turns out that there is no .text in the callbackquery.
Maybe you can tell me how to assign to a variable what the user entered?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question