From 2521b7d6c92232d9fa5e2802ca06b63faf7cfb5d Mon Sep 17 00:00:00 2001 From: zevaryx Date: Tue, 9 May 2023 09:20:22 -0600 Subject: [PATCH] fix: Finalize beanie migration --- jarvis_core/db/models/__init__.py | 2 ++ jarvis_core/db/models/captcha.py | 12 ++++++++++++ pyproject.toml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 jarvis_core/db/models/captcha.py diff --git a/jarvis_core/db/models/__init__.py b/jarvis_core/db/models/__init__.py index 74c067f..d9347c8 100644 --- a/jarvis_core/db/models/__init__.py +++ b/jarvis_core/db/models/__init__.py @@ -17,6 +17,7 @@ __all__ = [ "Autoreact", "Ban", "Config", + "Filter", "Guess", "Kick", "Lock", @@ -243,6 +244,7 @@ all_models = [ Autoreact, Ban, Config, + Filter, Guess, Kick, Lock, diff --git a/jarvis_core/db/models/captcha.py b/jarvis_core/db/models/captcha.py new file mode 100644 index 0000000..d10752f --- /dev/null +++ b/jarvis_core/db/models/captcha.py @@ -0,0 +1,12 @@ +from datetime import datetime +from beanie import Document +from pydantic import Field + +from jarvis_core.db.utils import get_now + + +class Captcha(Document): + user: int + guild: int + correct: str + created_at: datetime = Field(default_factory=get_now) diff --git a/pyproject.toml b/pyproject.toml index aa6972a..1f63e82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "JARVIS core" authors = ["Zevaryx "] [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10,<4" orjson = {version = "^3.6.6"} motor = "^3.1.1" PyYAML = {version = "^6.0"}