skip to Main Content

Aiogram Telegram delete messages with links – Telegram API

@dp.message_handler(lambda message: message.entities != [] and message.chat.id) async def delete_messages(message: types.Message): for entity in message.entities: if entity.type in ["url", "text_link"]: await bot.delete_message(message.from_user.id, message.message_id) break I tried this, but the message does not want to be deleted, tell me, please, what…

VIEW QUESTION
Back To Top
Search