commit | c42df7176b6f026c11de9275f086c861e71728a0 | [log] [tgz] |
---|---|---|
author | TheCodedProf <samuel.shuert@gmail.com> | Sun Mar 05 17:32:11 2023 -0500 |
committer | TheCodedProf <samuel.shuert@gmail.com> | Sun Mar 05 17:32:11 2023 -0500 |
tree | 2afd7f349b4b390d9407c01eca9fcf8e380ec8d7 | |
parent | e915a385fb966c710d513c1f2ace41db52332716 [diff] |
fixed rendering of time
diff --git a/src/utils/log.ts b/src/utils/log.ts index bc95dd8..f1c03ef 100644 --- a/src/utils/log.ts +++ b/src/utils/log.ts
@@ -44,10 +44,12 @@ return `${user.username} [<@${user.id}>]`; }, renderTime(t: number) { + if(isNaN(t)) return "Unknown" t = Math.floor((t /= 1000)); return `<t:${t}:D> at <t:${t}:T>`; }, renderDelta(t: number) { + if(isNaN(t)) return "Unknown" t = Math.floor((t /= 1000)); return `<t:${t}:R> (<t:${t}:D> at <t:${t}:T>)`; },