I was wondering if there was anyway to check how many times admin is used within a certain time period and modify roles based off that. For example if someone started kicking loads of people within a short time span it removes their roles to do that?
Any help is appreciated.
Setup up your bot to record to a file each time an admin command like kick was used (and the time alongside it) and increase a counter by 1, when the counter reaches a certain threshold you read the file and minus the old time from the most recent which gives you your time range. Use this to decide wherever to kick the user.
Then you can decide. You can also reset the counter every X minutes to ensure they bot doesn't get out of control
Discord.py auto moderation