WIP: Event [logging]

This commit is contained in:
Profitroll 2023-04-14 13:28:48 +02:00
parent 0c46f98225
commit 1d14fd014b

View File

@ -13,6 +13,7 @@ from pyrogram.types import Message, User
from pyrogram.enums import ParseMode from pyrogram.enums import ParseMode
from app import app from app import app
from modules.logging import logWrite
from modules.utils import configGet from modules.utils import configGet
collections = db.list_collection_names() collections = db.list_collection_names()
@ -31,6 +32,9 @@ async def stage_passer(
return False return False
if col_event.find_one({"user": user.id, "stage": current}) is None: if col_event.find_one({"user": user.id, "stage": current}) is None:
logWrite(
f"User {user.first_name} ({user.id}) has completed event stage {current}"
)
col_event.insert_one( col_event.insert_one(
{"user": user.id, "stage": current, "date": datetime.now()} {"user": user.id, "stage": current, "date": datetime.now()}
) )