Answer the question
In order to leave comments, you need to log in
Why TypeError?
I'm doing a wedding in a bot through buttons, I need to check if the ID of the person who called the button matches the ID of the person who clicked on it, and so ... Error.
The code:
@bot.callback_query_handler(func=lambda call: True)
def callback_marry_y(call, message: types.Message):
if call.message:
if call.data == f'button_marry_y.{message.from_user.id}':
if call.from_user.id == message.from_user.id:
print('da')
else:
print('net')
TypeError: callback_marry_y() missing 1 required positional argument: 'message'
Answer the question
In order to leave comments, you need to log in
So translate the error from English, because the reason for callback_marry_y is missing 1 required positional argument: 'message'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question