I would like to know how i can check how much time has passed since an event (interactionCreate in my case) was fired, and do something after a certain amount. This is my current code:
  client.once('interactionCreate', interaction => {
                    if (!interaction.isButton()) return;
                    if (interaction.customId == '1') {
                        // do something 
                    } else {
                        // do something else
                    }
                })
It will check which of 2 buttons is pressed, but i also want to check if no button has been pressed in, let's say, 20 seconds, in that case it will do something different like sending a message but most importantly make it unable to interact with the 2 buttons.
How could i do this?