GloryBot/classes/pycordcheck.py

37 lines
685 B
Python
Raw Normal View History

2024-05-01 22:15:35 +03:00
from datetime import datetime
import logging
from dataclasses import dataclass
from typing import List
from bson import ObjectId
from bson.regex import Regex
from modules.database import col_checks
logger = logging.getLogger(__name__)
@dataclass
class PycordCheck:
"""Dataclass of DB entry of a security check"""
__slots__ = (
"_id",
"guild",
"thread_id",
"member",
"date_created",
"date_modified",
"challenge",
"answers",
)
_id: ObjectId
guild: ObjectId
thread_id: int
member: ObjectId
date_created: datetime
date_modified: datetime
challenge: str
answers: List[Regex]