For awhile I used json files, now I store commands in a database, but you could do any sort of data persistence that your heart desires.
I’m sure there are tons of examples out there, and my bot definitely isn’t the best, but if you’d like to see it’s source code let me know.