Made it so the bot dm's the creator and logs it in an logging channel

This commit is contained in:
Sébastien Guzman 2020-12-03 22:40:33 +01:00
parent 9b4dcdee51
commit 390bec85c8

View File

@ -126,6 +126,12 @@ module.exports = {
let u = await client.users.fetch(ticket.creator);
if (u) {
let dm;
try {
dm = u.dmChannel || await u.createDM();
} catch (e) {
log.warn(`Could not create DM channel with ${u.tag}`);
}
const archive = client.channels.cache.find(ch => ch.id === "")
let res = {};
@ -158,6 +164,7 @@ module.exports = {
try {
archive.send(res)
dm.send(res)
} catch (e) {
message.channel.send('❌ Couldn\'t send to Logging Channel.');
}