Whow to use callback_query_handler in Python 3.10

17 views Asked by At

In my code

@telebot.TeleBot.callback_query_handler(func=lambda callback: True )
def answer(callback):

I get error:

TypeError: TeleBot.callback_query_handler() missing 1 required positional argument: 'self'

I'm using these versions:

  • Python 3.10
  • telebot 0.0.5

What can I do to fix this problem?

I've write my first bot for telegram and I need buttons I saw on youtube this code working @client.callback_query_handlers(func=lambda call: True), but this code get me another error: TypeError: 'list' object is not callable

And I can't understand whow can I use callback_query_handlers in Python 3.10 and up.

0

There are 0 answers