|
@@ -4,10 +4,10 @@ import random |
|
|
from datetime import datetime |
|
|
from datetime import datetime |
|
|
from typing import TypedDict |
|
|
from typing import TypedDict |
|
|
|
|
|
|
|
|
from .config import DB |
|
|
|
|
|
from .consts import AnswerType, Character, Platform |
|
|
|
|
|
from .models import Answer, AnsweredFlag, Query, User |
|
|
|
|
|
from .talk import Talk |
|
|
|
|
|
|
|
|
from nizika_ai.config import DB |
|
|
|
|
|
from nizika_ai.consts import AnswerType, Character, Platform |
|
|
|
|
|
from nizika_ai.models import Answer, AnsweredFlag, Query, User |
|
|
|
|
|
from nizika_ai.talk import Talk |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main ( |
|
|
def main ( |
|
@@ -60,10 +60,14 @@ def add_answer ( |
|
|
def add_answered_flags ( |
|
|
def add_answered_flags ( |
|
|
answer: Answer, |
|
|
answer: Answer, |
|
|
) -> None: |
|
|
) -> None: |
|
|
print (answer.answer_type) |
|
|
|
|
|
if answer.answer_type in [AnswerType.YOUTUBE_REPLY]: |
|
|
|
|
|
|
|
|
answer_type: AnswerType |
|
|
|
|
|
try: |
|
|
|
|
|
answer_type = AnswerType (answer.answer_type) |
|
|
|
|
|
except Exception: |
|
|
|
|
|
return |
|
|
|
|
|
if answer_type in [AnswerType.YOUTUBE_REPLY]: |
|
|
add_answered_flag (answer, Platform.YOUTUBE) |
|
|
add_answered_flag (answer, Platform.YOUTUBE) |
|
|
if answer.answer_type in [AnswerType.BLUESKY_REPLY]: |
|
|
|
|
|
|
|
|
if answer_type in [AnswerType.BLUESKY_REPLY]: |
|
|
add_answered_flag (answer, Platform.BLUESKY) |
|
|
add_answered_flag (answer, Platform.BLUESKY) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|