Далее нажмите кнопку "Я оплатил(а)"""
buttons = []
prices = get_prices()
keyboard = InlineKeyboardMarkup()
for id in prices.keys():
buttons.append(InlineKeyboardButton(text=prices[id]['text'],
callback_data='create_bill_' + id))
keyboard.row(*buttons[:len(buttons) // 2])
keyboard.row(buttons[2])
keyboard.row(*buttons[3:])
keyboard.add(InlineKeyboardButton(text='Назад', callback_data='back_bill'))
try:
await query.message.edit_text(text, reply_markup=keyboard)
except:
await bot.send_message(query.chat.id,text,reply_markup=keyboard)
finally:
await state.finish()
btn1 = InlineKeyboardButton(......)
btn2 = InlineKeyboardButton(......)
btn3 = InlineKeyboardButton(......)
...
keyboard.row(btn1, btn2)
keyboard.row(btn3)
...