error fix
parent
833066e2fc
commit
f74a0fd07e
|
@ -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(() => {});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue