Answer the question
In order to leave comments, you need to log in
Why is call.data not responding?
@dp.callback_query_handler()
async def randws(call: CallbackQuery):
if call.data == 'amf':
await call.message.answer('hello')
Answer the question
In order to leave comments, you need to log in
Your handler accepts text, which is needed for regular buttons, after clicking which a message is sent from the user.
For example, you can implement it like this:
@dp.callback_query_handler(lambda c: c.data == 'amf')
async def randws(call: CallbackQuery):
await call.message.answer('gggg')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question