From 597a588132a591778df7523eb4f7e63e0fe4745a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Guzman?= <36934590+mgsi100@users.noreply.github.com> Date: Thu, 3 Dec 2020 22:26:28 +0100 Subject: [PATCH] edited the command so that the message is send to a channel instead of to the creator --- src/commands/close.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/commands/close.js b/src/commands/close.js index c935eb6..c336456 100644 --- a/src/commands/close.js +++ b/src/commands/close.js @@ -126,13 +126,7 @@ 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 === "yourchannelidhere") let res = {}; const embed = new MessageEmbed() @@ -163,9 +157,9 @@ module.exports = { try { - dm.send(res).then(); + archive.send(res) } catch (e) { - message.channel.send('❌ Couldn\'t send DM'); + message.channel.send('❌ Couldn\'t send to Logging Channel.'); } } }