fixed chat not counted
This commit is contained in:
parent
0979b10610
commit
a48cf6dacc
@ -14,6 +14,7 @@ from config import (
|
||||
from program import __version__
|
||||
from driver.veez import user
|
||||
from driver.filters import command, other_filters
|
||||
from driver.database.dbchat import add_served_chat, is_served_chat
|
||||
from driver.database.dbpunish import is_gbanned_user
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram import __version__ as pyrover
|
||||
@ -145,6 +146,11 @@ async def get_uptime(client: Client, message: Message):
|
||||
|
||||
@Client.on_message(filters.new_chat_members)
|
||||
async def new_chat(c: Client, m: Message):
|
||||
chat_id = m.chat.id
|
||||
if await is_served_chat(chat_id):
|
||||
pass
|
||||
else:
|
||||
await add_served_chat(chat_id)
|
||||
ass_uname = (await user.get_me()).username
|
||||
bot_id = (await c.get_me()).id
|
||||
for member in m.new_chat_members:
|
||||
@ -182,5 +188,5 @@ async def chat_watcher_func(_, message: Message):
|
||||
except Exception:
|
||||
return
|
||||
await message.reply_text(
|
||||
f"👮🏼 (> {suspect} <)\n\n**Gbanned** user joined, that user has been gbanned by sudo user and was blocked from this Chat !\n\n🚫 **Reason:** potential spammer and abuser."
|
||||
f"👮🏼 (> {suspect} <)\n\n**Gbanned** user detected, that user has been gbanned by sudo user and was blocked from this Chat !\n\n🚫 **Reason:** potential spammer and abuser."
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user