Update close.js

This commit is contained in:
ItzEmerald authored and GitHub committed 2020-03-31 00:14:47 +01:00
1 parent a44bb949eb
commit 953db88ed2
1 file changed
+4 -2
+4 -2
View File
@@ -41,7 +41,7 @@ exports.run = (bot, message, args) => {
errors: [ 'time' ], errors: [ 'time' ],
} ).then( collected => { } ).then( collected => {
let logChannel = message.guild.channels.find( channel => channel.name === supportbot.Transcript_Logs ); let logChannel = message.guild.channels.find(channel => channel.name === supportbot.Transcript_Log);
let user = message.author; let user = message.author;
@@ -81,7 +81,9 @@ exports.run = (bot, message, args) => {
// message.author.send( `A transcript has been generated for the ticket you closed.` ); // message.author.send( `A transcript has been generated for the ticket you closed.` );
// message.author.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) ); // message.author.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
logChannel.send(logEmbed) logChannel.send(logEmbed).catch(err => {
message.reply(err)
})
logChannel.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) ); logChannel.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
message.channel.delete(); message.channel.delete();