From 74571bf37d4d3a47d7a7223d2c03af600e5d021e Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Mon, 28 Feb 2022 05:24:39 +0700 Subject: [PATCH] [check] some fixes --- program/start.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/program/start.py b/program/start.py index 39b1250..aae8254 100644 --- a/program/start.py +++ b/program/start.py @@ -197,11 +197,13 @@ async def new_chat(c: Client, m: Message): else: await add_served_chat(chat_id) for member in m.new_chat_members: - if chat_id in await blacklisted_chats(): - await m.reply( - "❗️ This chat has blacklisted by sudo user and You're not allowed to use me in this chat." - ) - return await bot.leave_chat(chat_id) + if member.id == me_bot.id: + try: + if chat_id in await blacklisted_chats(): + await m.reply_text( + "❗️ This chat has blacklisted by sudo user and You're not allowed to use me in this chat." + ) + return await bot.leave_chat(chat_id) if member.id == me_bot.id: return await m.reply( "❤️ Thanks for adding me to the **Group** !\n\n"