I’m making a Discord bot and I wanted to add a way to log chat history so that if the repl disconnects on me, I can just hit run to start it up again and continue like nothing happened without resetting its “chat history”.
I’m using Python and I was thinking of reading and writing to a txt file, but I’m wondering if there’s a better way that doesn’t involve creating a publicly visible txt file with all the chat logs?