From 078f08a7dfe10fc566f1d45f04eaff571d04c842 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sat, 24 Jun 2023 13:06:47 +0200 Subject: [PATCH] fix capitalization --- distbot/plugins/didyouknow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distbot/plugins/didyouknow.py b/distbot/plugins/didyouknow.py index 6ee9865..ad3f285 100644 --- a/distbot/plugins/didyouknow.py +++ b/distbot/plugins/didyouknow.py @@ -39,13 +39,13 @@ class DidYouKnow(Worker): db = json.load(fd) except Exception as e: db = {"quotes": []} - fact = random.choice(DB + db["quotes"]) + fact: str = random.choice(DB + db["quotes"]) db["quotes"].append(msg["body"]) fd.seek(0) json.dump(db, fd, indent=2) answer = random.choice(self.answers) - return Action(msg="{} {}".format(answer, fact.capitalize() if answer.endswith(".") else fact)) + return Action(msg="{} {}".format(answer, (fact[0].upper() + fact[1:]) if answer.endswith(".") else fact)) ALL = [DidYouKnow] -- 2.39.2