error fix

master
Matthew 2021-07-08 14:15:54 -04:00
parent 833066e2fc
commit f74a0fd07e
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 52 additions and 52 deletions

View File

@ -12,12 +12,12 @@ export default function checkLock(client: Client): NodeJS.Timeout {
if (!judgement.expires) return; if (!judgement.expires) return;
if (new Date() > judgement.expires) { if (new Date() > judgement.expires) {
await client.db.Judgement.deleteOne(({ _id: judgement._id })); await client.db.Judgement.deleteOne(({ _id: judgement._id }));
const log = <TextChannel> client.guilds.get(this.client.config.guildID).channels.get('611584771356622849'); const log = <TextChannel> client.guilds.get(client.config.guildID).channels.get('611584771356622849');
const embed = new RichEmbed(); const embed = new RichEmbed();
embed.setTitle('Judgement - Rescind'); embed.setTitle('Judgement - Rescind');
embed.addField('Member', `<@${judgement.userID}>`, true); embed.addField('Member', `<@${judgement.userID}>`, true);
embed.addField('Rescinded by', 'SYSTEM', true); embed.addField('Rescinded by', 'SYSTEM', true);
embed.setFooter(this.client.user.username, this.client.user.avatarURL); embed.setFooter(client.user.username, client.user.avatarURL);
embed.setTimestamp(); embed.setTimestamp();
log.createMessage({ embed }).catch(() => {}); log.createMessage({ embed }).catch(() => {});
} }