Skip to content

Instantly share code, notes, and snippets.

@Hkazanci93
Last active November 3, 2021 21:39
Embed
What would you like to do?
playerdata.forEach(function (item, index) {
var namepath = `._${item.name}`
var seconds = Math.floor((new Date() - Date.parse(item.lastping)) / 1000);
if (seconds > 30) {
client.json_del('players', namepath)
client.json_del('leaderboard', namepath)
console.log(`Removed ${item.name}`)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment