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
+5 -3
+5 -3
View File
@@ -41,7 +41,7 @@ exports.run = (bot, message, args) => {
errors: [ 'time' ],
} ).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;
@@ -51,7 +51,7 @@ exports.run = (bot, message, args) => {
let ticketChannel = message.channel;
message.channel.send(`**${supportbot.Ticket_Closing}**`)
.then( () => {
.then(() => {
const logEmbed = new Discord.RichEmbed()
.setTitle(supportbot.Transcript_Title)
.setColor(supportbot.EmbedColour)
@@ -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( 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` ) );
message.channel.delete();