Почему callback_query выдает ошибку при нажатии на кнопку
код где создается кнопка
@dp.message_handler(text='?Профиль')
async def profile_user(message: types.Message):
info_user = {
'Username': message.from_user.username,
'first name': message.from_user.first_name,
'ID user': message.from_user.id,
'Primary': 'NO',
}
full_info = f"?<b>User name</b>: {info_user['Username']}\n" \
f"?<b>First name</b>: {info_user['first name']}\n" \
f"?<b>ID</b>: {info_user['ID user']}\n" \
f"?<b>Prime</b>: {info_user['Primary']}"
inlineKEYBOD = types.InlineKeyboardMarkup(row_width=2)
button_inl = [types.InlineKeyboardButton('?Пополнить баланс', callback_data='q1'), types.InlineKeyboardButton('?Купить Прайм', callback_data='q2'),
types.InlineKeyboardButton('?История покупок', callback_data='q3'), types.InlineKeyboardButton('?История пополнений', callback_data='q4')]
inlineKEYBOD.add(button_inl[0], button_inl[1])
inlineKEYBOD.add(button_inl[2], button_inl[3])
await bot.send_message(message.from_user.id,
full_info,
reply_markup=inlineKEYBOD,
parse_mode='html')
код где начинается обработка
@dp.callback_query_handler()
async def handlers_call(call: types.CallbackQuery):
if call.data == 'q1':
await bot.send_message(call.from_user.id, text="<b>Выберите способ оплаты</b>", reply_markup=payment_acceptance, parse_mode='html')
Выдаёт ошибку:
aiogram.utils.exceptions.BadRequest: Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard