history empty arr fix
parent
d9ccbc4e6c
commit
e85193eac5
|
@ -26,7 +26,8 @@ export default class Score_Hist extends Command {
|
||||||
user = message.author;
|
user = message.author;
|
||||||
if (!user) return this.error(message.channel, 'Member not found.');
|
if (!user) return this.error(message.channel, 'Member not found.');
|
||||||
const hists = await this.client.db.ScoreHistorical.find({ userID: user.id }).lean().exec();
|
const hists = await this.client.db.ScoreHistorical.find({ userID: user.id }).lean().exec();
|
||||||
if (!hists || hists?.length <= 0) return this.error(message.channel, 'No history found.');
|
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 histArray: [{ name: string, value: string }?] = [];
|
||||||
const totalArray: number[] = [];
|
const totalArray: number[] = [];
|
||||||
const activityArray: number[] = [];
|
const activityArray: number[] = [];
|
||||||
|
|
Loading…
Reference in New Issue