]> git.aero2k.de Git - urlbot-v3.git/commitdiff
minor language fixes
authorThorsten <mail@aero2k.de>
Sat, 24 Jun 2023 09:22:53 +0000 (11:22 +0200)
committerThorsten <mail@aero2k.de>
Sat, 24 Jun 2023 09:25:20 +0000 (11:25 +0200)
distbot/plugins/didyouknow.py

index 39cf75ae8d3cc14772b0993e81da33cf02d4d622..6ee986557a1f0aba73e5ff2d25fd4fa8b217b38e 100644 (file)
@@ -26,11 +26,11 @@ class DidYouKnow(Worker):
         self.dynamic_db = "didyouknow.json"
 
     answers = [
-        "Nö. Aber: ",
-        "Olle Kamelle - ",
-        "Ja klar. ",
-        "Ja, hab ich gestern im Internet gefunden. ",
-        "Nein, glaub' ich auch nicht. "
+        "Nö. Aber:",
+        "Olle Kamelle -",
+        "Ja klar.",
+        "Ja, hab ich gestern im Internet gefunden.",
+        "Nein, glaub' ich auch nicht."
     ]
 
     def parse_body(self, msg):
@@ -45,7 +45,7 @@ class DidYouKnow(Worker):
             json.dump(db, fd, indent=2)
 
         answer = random.choice(self.answers)
-        return Action(msg="{} {}".format(answer, fact))
+        return Action(msg="{} {}".format(answer, fact.capitalize() if answer.endswith(".") else fact))
 
 
 ALL = [DidYouKnow]