From: Thorsten Date: Fri, 23 Jun 2023 20:01:47 +0000 (+0200) Subject: fix machine learning X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=5597a7b0e918b75b4b888d737a408a0a6cb0fd9c;p=urlbot-v3.git fix machine learning --- diff --git a/distbot/plugins/didyouknow.py b/distbot/plugins/didyouknow.py index f3adbc5..39cf75a 100644 --- a/distbot/plugins/didyouknow.py +++ b/distbot/plugins/didyouknow.py @@ -41,7 +41,7 @@ class DidYouKnow(Worker): db = {"quotes": []} fact = random.choice(DB + db["quotes"]) db["quotes"].append(msg["body"]) - + fd.seek(0) json.dump(db, fd, indent=2) answer = random.choice(self.answers)