Fix invalid date showing

merge-requests/1/merge
Bsian 2019-10-29 17:43:26 +00:00
parent c9fed63480
commit 8db1f65691
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ export default class Util {
.setFooter(this.client.user.username, this.client.user.avatarURL) .setFooter(this.client.user.username, this.client.user.avatarURL)
.setTimestamp(); .setTimestamp();
if (reason) embed.addField('Reason', reason || 'Not specified'); if (reason) embed.addField('Reason', reason || 'Not specified');
if (type === 2) embed.addField('Lock Expiration', `${moment(date).format('dddd, MMMM Do YYYY, h:mm:ss A')}`); if (type === 2) embed.addField('Lock Expiration', `${date ? moment(date).format('dddd, MMMM Do YYYY, h:mm:ss A') : 'Indefinitely'}`);
// @ts-ignore // @ts-ignore
this.client.createMessage('580950455581147146', { embed }); this.client.getDMChannel(userID).then((channel) => channel.createMessage({ embed })).catch(); this.client.createMessage('580950455581147146', { embed }); this.client.getDMChannel(userID).then((channel) => channel.createMessage({ embed })).catch();