case bugfix

This commit is contained in:
Erik 2022-07-07 19:00:08 +03:00
parent 097b2ddf08
commit 7103f712e3
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -80,7 +80,7 @@ class CaseCommand extends SlashCommand {
message: infraction.message message: infraction.message
}); });
if (infraction.data.seconds) description += '\n' + invoker.format(caseSlowmodeIndex, { readable: Util.humanise(infraction.data.seconds), seconds: infraction.data.seconds }); if (infraction.data?.seconds) description += '\n' + invoker.format(caseSlowmodeIndex, { readable: Util.humanise(infraction.data.seconds), seconds: infraction.data.seconds });
if (infraction.duration !== null) { if (infraction.duration !== null) {
const duration = Math.floor(infraction.duration / 1000); const duration = Math.floor(infraction.duration / 1000);
description += '\n' + invoker.format(caseLengthIndex, { time: Util.humanise(duration), inSeconds: duration }); description += '\n' + invoker.format(caseLengthIndex, { time: Util.humanise(duration), inSeconds: duration });