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]