From 38587d68ac43aa22d6b23de751fd9d7b6c3104b3 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sat, 23 Jul 2022 19:33:07 +0300 Subject: [PATCH] indicate expired points --- src/structure/components/commands/moderation/History.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/structure/components/commands/moderation/History.js b/src/structure/components/commands/moderation/History.js index e8678f5..96225a7 100644 --- a/src/structure/components/commands/moderation/History.js +++ b/src/structure/components/commands/moderation/History.js @@ -161,7 +161,10 @@ class HistoryCommand extends SlashCommand { } if (infraction.duration) string += `\n**Duration:** ${Util.humanise(Math.floor(infraction.duration/1000))}`; - if (infraction.points) string += `\n**Points:** ${infraction.points}`; + if (infraction.points) { + string += `\n**Points:** ${infraction.points}`; + if (infraction.expiration && infraction.expiration <= Date.now()) string += ' (expired)'; + } string += `\n**Reason:** \`${infraction.reason ? handleReason(infraction.reason) : '`N/A`'}\``; if (i !== results.length - 1) string += `\n\u200b`; //Space out cases (as long as its not at the end)