So I have a Discord bot that does moderation and stuff. So I have timed the mute command and it removes the mute from the user when time ends. So I use setTimeout to query about the data from the database every second and if it finds that the expiry time is equal or is less than the current time it removes the mute. So is there any better option to do this? I am thinking this is increasing my bot's ram usage.
You could use a database for this. Let's get to the solution.