Update close.js

This commit is contained in:
Isaac 2020-12-03 21:59:41 +00:00 committed by GitHub
parent 390bec85c8
commit 2b5282b19e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ module.exports = {
} catch (e) {
log.warn(`Could not create DM channel with ${u.tag}`);
}
const archive = client.channels.cache.find(ch => ch.id === "")
let res = {};
const embed = new MessageEmbed()
@ -160,13 +160,12 @@ module.exports = {
}
res.embed = embed;
try {
archive.send(res)
dm.send(res)
dm.send(res);
if (config.logs.discord.enabled) client.channels.cache.get(config.logs.discord.channel).send(res);
} catch (e) {
message.channel.send('❌ Couldn\'t send to Logging Channel.');
message.channel.send('❌ Couldn\'t send DM or transcript log message');
}
}
}
@ -228,4 +227,4 @@ module.exports = {
});
}
};
};