как решить проблему AttributeError: 'Message' object has no attribute 'message'. Did you mean: 'message_id'? ( chat_id = call.message.chat.id

@bot.callback_query_handler(func=lambda call: True) def handle_callback_query(call): chat_id = call.message.chat.id if call.data == 'wall': with open(photo_path3, 'rb') as photo: bot.send_photo(chat_id, photo, wallet_text) print('bob1') receive_wallet(call) #return elif call.data == 'balance': with open(photo_path3, 'rb') as photo: markup = types.InlineKeyboardMarkup() back_btn = types.InlineKeyboardButton('Назад', callback_data='back') markup.add(back_btn)

        bot.send_photo(chat_id, photo, balance_text, reply_markup=markup)
elif call.data == 'terms':
    with open(photo_path2, 'rb') as photo:
        markup = types.InlineKeyboardMarkup()
        back_btn = types.InlineKeyboardButton('Назад', callback_data='back')
        markup.add(back_btn)
        bot.send_photo(chat_id, photo, terms_text, reply_markup=markup)
elif call.data == 'back':
    # Отправить главное меню
    markup = types.InlineKeyboardMarkup()
    btn1 = types.InlineKeyboardButton('Условия Terms', callback_data='terms')
    btn2 = types.InlineKeyboardButton('Баланс Balance', callback_data='balance')
    btn3 = types.InlineKeyboardButton('Кошелек Wallet', callback_data='wall')
    markup.row(btn1, btn2)
    markup.row(btn3)
    bot.send_message(chat_id, 'Главное меню')
    with open(photo_path1, 'rb') as photo:
        bot.send_photo(chat_id, photo, airdrop_photo_text, reply_markup=markup)
elif call.data == 'yes':
    markup = types.InlineKeyboardMarkup()
    back_btn = types.InlineKeyboardButton('Назад', callback_data='back')
    markup.add(back_btn)
    wallet = user_data[call.message.chat.id]['walls']
    confirm_wallet(call.message, wallet)
elif call.data == 'no':
    bot.send_message(chat_id, 'Пожалуйста, введите свой кошелек еще раз:')
    receive_wallet(call.message)

Ответы (0 шт):