Ask coding questions

← Back to all posts
Text files keep reverting

My bot stores user and game info in text files so when the user does a command the bot will look to the text file to see where that user left off.

For some reason, if that file has been sitting for a while (and I don't know the length of time) it will revert back to before it was edited. I have a few games our users play and as long as you're there playing the game the files update and read exactly as they're supposed to, but let it sit for a few hours and the user goes back to the game and they will lose some of the saved info because the file has reverted back to an earlier time. What is doing this and can I fix it?

These are files that are stored here on this site, not on a third party cloud.

Answered by MrVoo [earned 5 cycles]
View Answer

Replt undos all changes to files not made by the creator for "security purposes"


So I'm assuming there's no way for me to change that setting to allow my bot to write. Sounds like money well spent on my behalf. =(


@ViperLuna Replit has a database, 99% sure it works with discord bots


This was never a problem when I hosted the bot on my computer. It's basic Python read() write() coding; nothing special. This only started happening after I moved it over here.