indicate expired points

This commit is contained in:
Erik 2022-07-23 19:33:07 +03:00
parent 150b5363c1
commit 38587d68ac
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -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)