@dp.callback_query_handler(text_contains='last_callback')
async def callback(call: CallbackQuery):
if call.data == "DIAMOND TASHKENT HOTEL 1 KISHILIK":
markup = types.InlineKeyboardMarkup(row_width=1)
btn3 = types.InlineKeyboardButton("БРОНИРОВАНИЕ-1️⃣", url="https://t.me/DIAMOND_TASHKENT_HOTEL_bot")
callback_data = CallbackData('any_prefix', 'messages_to_delete')
btn2 = types.InlineKeyboardButton("назад↩️", callback_data=callback_data.new(
messages_to_delete=(call.message.message_id + 1)
))
markup.add(btn2, btn3)
p = open("D:\DIAMOND\single_room\DIAMOND_1.jpg", "rb")
b = open("D:\DIAMOND\single_room\DIAMOND_2.jpg", "rb")
c = open("D:\DIAMOND\single_room\DIAMOND_3.jpg", "rb")
d = open("D:\DIAMOND\single_room\DIAMOND_4.jpg", "rb")
await call.message.answer_media_group([InputMediaPhoto(p), InputMediaPhoto(b), InputMediaPhoto(c), InputMediaPhoto(d)])
await call.message.delete()
await call.message.answer('Информация о номере!\n\nЦена\nРезидентам:', reply_markup=markup)
@dp.callback_query_handler(text_contains='any_prefix')
async def callback(call: CallbackQuery):
bot.delete_message(chat_id=call.message.chat.id, message_id=call.data.split(':')[1])