From 5dec21ad8501c776306458e31c54dff0e301a38d Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@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