@dp.message_handler(content_types=["new_chat_members"])
async def handler_new_member(message):
first_name = message.new_chat_members[0].first_name
markup = InlineKeyboardMarkup(row_width=1)
btn1 = InlineKeyboardButton(text=f"Привет", callback_data='hidelete')
markup.add(btn1)
await bot.send_message(message.chat.id, "✔ Благодарим Вас за подписку!0}".format(first_name), reply_markup=markup, disable_notification=True)
await message.delete()
@dp.message_handler(content_types=["new_chat_members"])
async def handler_new_member(message):
first_name = message.new_chat_members[0].first_name
markup = InlineKeyboardMarkup(row_width=1)
markup.insert(InlineKeyboardButton(text='Привет', callback_data='hidelete')
await bot.send_message(message.chat.id, "✔ Благодарим Вас за подписку!0}".format(first_name), disable_notification=True, reply_markup=markup)
await message.delete()
@dp.callback_query_handler(text='hidelete')
async def hideletefun(call: CallbackQuery):
await message.delete()
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
а параметры то не ввёл...