حذف ایدی و حذف نکردن لینک های ادمین

This commit is contained in:
2026-08-08 19:05:18 +03:30
parent 293907e196
commit 99112db313
+3
View File
@@ -11,6 +11,7 @@ LINK_REGEX = (
r"ftp:\/\/[^\s]+|"
r"www\.[^\s]+|"
r"[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?)"
r"@[a-zA-Z0-9_]{3,}"
)
GROUP_ID_PATTERNS = [
@@ -132,6 +133,8 @@ async def ban(message):
@bot.on_message(regex(LINK_REGEX))
async def delete_links(message):
if await guard(message):
return
try:
await message.delete()
logger.info(