|
|
@@ -6,12 +6,15 @@ from enum import Enum |
|
|
|
|
|
|
|
from eloquent import DatabaseManager, Model |
|
|
|
|
|
|
|
from config import CONFIG |
|
|
|
from models import Answer, Query, User |
|
|
|
from talk import Talk |
|
|
|
|
|
|
|
|
|
|
|
def main ( |
|
|
|
) -> None: |
|
|
|
db = DatabaseManager (CONFIG) |
|
|
|
Model.set_connection_resolver (db) |
|
|
|
queries: list[Query] = Query.where ('answered', False).get () |
|
|
|
query: Query = random.choice (queries) |
|
|
|
message: str | list[dict[str, str | dict[str, str]]] |
|
|
|