From 6b026967f9819553805ddaa5d05dd4954177eb7b Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 16 Nov 2020 12:17:10 -0500 Subject: [PATCH] fix --- src/commands/score_hist.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/score_hist.ts b/src/commands/score_hist.ts index 7940cc4..10da4f5 100644 --- a/src/commands/score_hist.ts +++ b/src/commands/score_hist.ts @@ -180,6 +180,7 @@ export default class Score_Hist extends Command { if (!user) return this.error(message.channel, 'Member not found.'); const hists = await this.client.db.ScoreHistorical.find({ userID: user.id }).lean().exec(); if (!hists) return this.error(message.channel, 'No history found.'); + if (hists.length < 1) return this.error(message.channel, 'No history found.'); const histArray: [{ name: string, value: string }?] = []; const totalArray: number[] = []; const activityArray: number[] = [];