From a12c9873ea48159f85abc3b9ab8112de411e1ded Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sat, 10 Sep 2022 10:48:36 +0300 Subject: [PATCH] display unresolved and total amount of infractions --- src/structure/components/commands/moderation/History.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structure/components/commands/moderation/History.js b/src/structure/components/commands/moderation/History.js index 0f1bd92..21c2a0b 100644 --- a/src/structure/components/commands/moderation/History.js +++ b/src/structure/components/commands/moderation/History.js @@ -101,6 +101,7 @@ class HistoryCommand extends SlashCommand { const { infractions } = this.client.storageManager.mongodb; const resultsAmt = await infractions.count(query); + const unresolvedAmt = await infractions.count({ ...query, resolved: false }); if (!resultsAmt) return { emoji: 'failure', index: 'COMMAND_HISTORY_NORESULTS' }; const maxPage = Math.ceil(resultsAmt / pageSize); @@ -119,7 +120,7 @@ class HistoryCommand extends SlashCommand { }, fields: [], footer: { - text: `• Page ${_page}/${maxPage} | ${resultsAmt} Results` + text: `• Page ${_page}/${maxPage} | ${unresolvedAmt} (${resultsAmt}) Results` }, color: me.roles.highest.color };