From a4024d01b568bb1222d7513109e504585251e14a Mon Sep 17 00:00:00 2001 From: baz Date: Mon, 10 Jun 2024 23:39:10 +0100 Subject: [PATCH] Add Average Beat Interval stat to User command --- commands/100-games/user.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/100-games/user.js b/commands/100-games/user.js index 32e9f4d..268097b 100644 --- a/commands/100-games/user.js +++ b/commands/100-games/user.js @@ -42,6 +42,7 @@ module.exports = { const start = new Date(2024, 0, 1); const days = (today - start) / (1000 * 60 * 60 * 24); const timepergame = days / beatenGamesDatabaseEntries.length; + embed.addFields({ name: 'Average Beat Interval', value: `${Math.round(timepergame)} days`, inline: true }); const finishdate = new Date(); finishdate.setDate(start.getDate() + (timepergame * 100)); const date = finishdate.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/');