mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
edited the command so that the message is send to a channel instead of to the creator
This commit is contained in:
parent
09aa116558
commit
597a588132
@ -126,13 +126,7 @@ module.exports = {
|
|||||||
let u = await client.users.fetch(ticket.creator);
|
let u = await client.users.fetch(ticket.creator);
|
||||||
|
|
||||||
if (u) {
|
if (u) {
|
||||||
let dm;
|
const archive = client.channels.cache.find(ch => ch.id === "yourchannelidhere")
|
||||||
try {
|
|
||||||
dm = u.dmChannel || await u.createDM();
|
|
||||||
} catch (e) {
|
|
||||||
log.warn(`Could not create DM channel with ${u.tag}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let res = {};
|
let res = {};
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
@ -163,9 +157,9 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dm.send(res).then();
|
archive.send(res)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
message.channel.send('❌ Couldn\'t send DM');
|
message.channel.send('❌ Couldn\'t send to Logging Channel.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user