From 67ad2cc4e575dab466c139cc05fdb3f383c6a1f5 Mon Sep 17 00:00:00 2001 From: blank X Date: Mon, 22 Mar 2021 00:03:01 +0700 Subject: [PATCH] Add [SCAM] --- sukuinote/plugins/admins.py | 2 ++ sukuinote/plugins/info.py | 2 ++ sukuinote/plugins/log_forwards.py | 8 ++++++++ sukuinote/plugins/log_reports.py | 10 ++++++++++ 4 files changed, 22 insertions(+) diff --git a/sukuinote/plugins/admins.py b/sukuinote/plugins/admins.py index 3e70162..987df6a 100644 --- a/sukuinote/plugins/admins.py +++ b/sukuinote/plugins/admins.py @@ -23,6 +23,8 @@ def _generate_sexy(entity, ping, is_creator): sexy_text += ' [SUPPORT]' if entity.is_scam: sexy_text += ' [SCAM]' + if getattr(entity, 'is_fake', None): + sexy_text += ' [FAKE]' if is_creator: sexy_text += ' [CREATOR]' return sexy_text diff --git a/sukuinote/plugins/info.py b/sukuinote/plugins/info.py index 3cf66d1..42bd6d4 100644 --- a/sukuinote/plugins/info.py +++ b/sukuinote/plugins/info.py @@ -25,6 +25,8 @@ def _generate_sexy(entity, ping): sexy_text += ' [SUPPORT]' if entity.is_scam: sexy_text += ' [SCAM]' + if getattr(entity, 'is_fake', None): + sexy_text += ' [FAKE]' return sexy_text @Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['info', 'whois'], prefixes=config['config']['prefixes'])) diff --git a/sukuinote/plugins/log_forwards.py b/sukuinote/plugins/log_forwards.py index 97784bc..abe75d9 100644 --- a/sukuinote/plugins/log_forwards.py +++ b/sukuinote/plugins/log_forwards.py @@ -40,6 +40,8 @@ async def log_forwards(client, message): chat_text += '[SUPPORT] ' if message.chat.is_scam: chat_text += '[SCAM] ' + if getattr(message.chat, 'is_fake', None): + chat_text += '[FAKE] ' text += f'[{message.chat.id}]' if message.chat.type != 'channel': if message.from_user: @@ -53,6 +55,8 @@ async def log_forwards(client, message): user_text += ' [SUPPORT]' if message.from_user.is_scam: user_text += ' [SCAM]' + if getattr(message.from_user, 'is_fake', None): + user_text += ' [FAKE]' user_text += f' [{message.from_user.id}]' elif message.sender_chat and message.sender_chat.id != message.chat.id: user_text = html.escape(message.sender_chat.title) @@ -64,6 +68,8 @@ async def log_forwards(client, message): user_text += ' [SUPPORT]' if message.sender_chat.is_scam: user_text += ' [SCAM]' + if getattr(message.sender_chat, 'is_fake', None): + user_text += ' [FAKE]' else: user_text = 'Anonymous' text += f'\n- Forwarder: {user_text}' @@ -85,6 +91,8 @@ async def log_forwards(client, message): user_text += ' [SUPPORT]' if forwardee.is_scam: user_text += ' [SCAM]' + if getattr(forwardee, 'is_fake', None): + user_text += ' [FAKE]' text += f'{user_text} [{forwardee.id}]' log_ring.append(text) logged[message.chat.id].add(message.message_id) diff --git a/sukuinote/plugins/log_reports.py b/sukuinote/plugins/log_reports.py index c51752f..625f6ef 100644 --- a/sukuinote/plugins/log_reports.py +++ b/sukuinote/plugins/log_reports.py @@ -25,6 +25,8 @@ async def log_reports(client, message): chat_text += '[SUPPORT] ' if message.chat.is_scam: chat_text += '[SCAM] ' + if getattr(message.chat, 'is_fake', None): + chat_text += '[FAKE] ' text += f'[{message.chat.id}]\n- Reporter: ' if message.from_user: user_text = message.from_user.first_name @@ -37,6 +39,8 @@ async def log_reports(client, message): user_text += ' [SUPPORT]' if message.from_user.is_scam: user_text += ' [SCAM]' + if getattr(message.from_user, 'is_fake', None): + user_text += ' [FAKE]' user_text += f' [{message.from_user.id}]' elif message.sender_chat and message.sender_chat.id != message.chat.id: user_text = html.escape(message.sender_chat.title) @@ -48,6 +52,8 @@ async def log_reports(client, message): user_text += ' [SUPPORT]' if message.sender_chat.is_scam: user_text += ' [SCAM]' + if getattr(message.sender_chat, 'is_fake', None): + user_text += ' [FAKE]' else: user_text = 'Anonymous' text += f'{user_text}\n' @@ -73,6 +79,8 @@ async def log_reports(client, message): user_text += ' [SUPPORT]' if reply.from_user.is_scam: user_text += ' [SCAM]' + if getattr(reply.from_user, 'is_fake', None): + user_text += ' [FAKE]' user_text += f' [{reply.from_user.id}]' elif reply.sender_chat and reply.sender_chat.id != reply.chat.id: user_text = html.escape(reply.sender_chat.title) @@ -84,6 +92,8 @@ async def log_reports(client, message): user_text += ' [SUPPORT]' if reply.sender_chat.is_scam: user_text += ' [SCAM]' + if getattr(reply.sender_chat, 'is_fake', None): + user_text += ' [FAKE]' else: user_text = 'Anonymous' text += f'{user_text}\n- Reported Message'