How To check the time active

How do I check the time active that members in the voice, I used the voiceStateUpdate Event and it will calculates by setInterval every 60000 ms will add time: 60000 to the user in JSON file, so how to let it stops the setInterval when the user leaves the voice channel. And continues again when joins the channels.
4 Replies
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
treble/luna
treble/luna15mo ago
why not store the timestamp upon joining and then calculate the time once they leave
Forhand.
Forhand.OP15mo ago
because it'll not calculate when someone is deafened or muted so that's why we can't use this way
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server