I'm trying to setup a warning system for a moderation bot with discord.py. Is there some way I can make it so when I use a !warn [user] [reason] command, it is stored in some type of database, but the warning is removed automatically after 30 days.
Is there also a way to make it so each warning has a specific case number, so that I can use a command to delete a specific warning, instead of deleting all of a user's warnings?
Also, I'm not sure what type of file to use to store all of that stuff, I've seen people use a bunch of different types. Not sure if it even changes anything.
You could store all of the warns in a .json file then where there is a list of all the warns with reasons, user ids, time when warn was given and so much more.   Then you can just make it so that when the !warn command is called, the bot removes any of the warns that have past 30 days using the date that is stored in the .json file.
How to make warnings expire? Discord.py