Browse Source

Add delete-same-channel-replies.py

dev
blank X 1 year ago
parent
commit
c7a6dde8df
  1. 18
      delete-same-channel-replies.py

18
delete-same-channel-replies.py

@ -0,0 +1,18 @@
from pyrogram import Client, filters
from ... import log_errors, public_log_errors
@Client.on_message(~filters.sticker & filters.chat(-1001150433131) & ~filters.linked_channel)
@log_errors
@public_log_errors
async def delete_same_channel_replies(client, message):
text = message.text or message.caption
if not text:
return
reply = message.reply_to_message
if getattr(reply, 'empty', True):
return
if not await filters.linked_channel_filter(None, None, reply):
return
reply_text = reply.text or reply.caption
if text == reply_text:
await message.delete()
Loading…
Cancel
Save