]> git.aero2k.de Git - urlbot-v3.git/commitdiff
fix machine learning
authorThorsten <mail@aero2k.de>
Fri, 23 Jun 2023 20:01:47 +0000 (22:01 +0200)
committerThorsten <mail@aero2k.de>
Fri, 23 Jun 2023 20:01:47 +0000 (22:01 +0200)
distbot/plugins/didyouknow.py

index f3adbc52461a83ef81e65c281fef4cd4b631c99d..39cf75ae8d3cc14772b0993e81da33cf02d4d622 100644 (file)
@@ -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)