|
|
|
@@ -70,15 +70,15 @@ def main ( |
|
|
|
if answer_flags: |
|
|
|
answer_flag = random.choice (answer_flags) |
|
|
|
answer = Answer.find (answer_flag.answer_id) |
|
|
|
if answer.query_ref.query_type == QueryType.YOUTUBE_COMMENT.value: |
|
|
|
if answer.query_rel.query_type == QueryType.YOUTUBE_COMMENT.value: |
|
|
|
query = Query.find (answer.query_id) |
|
|
|
deerjika.talk (query.content, answer.content) |
|
|
|
answer_flag.answered = True |
|
|
|
answer_flag.save () |
|
|
|
DB.commit () |
|
|
|
add_query (broadcast) |
|
|
|
except Exception: |
|
|
|
pass |
|
|
|
except Exception as ex: |
|
|
|
print (ex) |
|
|
|
game.redraw () |
|
|
|
|
|
|
|
|
|
|
|
@@ -464,7 +464,10 @@ class Deerjika (Creature): |
|
|
|
def read_out ( |
|
|
|
self, |
|
|
|
) -> None: |
|
|
|
Sound ('./nizika_talking.wav').play () |
|
|
|
try: |
|
|
|
Sound ('./nizika_talking.wav').play () |
|
|
|
except Exception: |
|
|
|
pass |
|
|
|
self.talking = True |
|
|
|
|
|
|
|
def _create_wav ( |
|
|
|
@@ -473,7 +476,7 @@ class Deerjika (Creature): |
|
|
|
) -> None: |
|
|
|
try: |
|
|
|
self.wav = Aques.main (message, False) |
|
|
|
except: |
|
|
|
except Exception: |
|
|
|
self.wav = None |
|
|
|
if self.wav is None: |
|
|
|
return |
|
|
|
|