From 141de1a3cd30bd77cf9314730f46671c1e5dcd33 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:03:12 +1000 Subject: [PATCH] I called it. I knew it was going to break it. --- src/commands/rank.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/rank.ts b/src/commands/rank.ts index 1aa538c..e1c0275 100644 --- a/src/commands/rank.ts +++ b/src/commands/rank.ts @@ -28,7 +28,7 @@ export default { }, leaderboard: ()=>{ const data = JSON.parse(readFileSync(path.join('./src/database/dailyMsgs.json'), 'utf8')).map((x: Array, i: number, a: any) => { - return x[1] - (a[i - 1] || [][1] || x[1]) + return x[1] - ((a[i - 1] || [])[1] || x[1]) }).slice(1).slice(-60); // handle negative days