Show more info in modmail thread closure notification

master
Miikka Virtanen 2016-12-21 04:36:04 +02:00
parent 4a1cb8dd07
commit f0f7231d6b
1 changed files with 4 additions and 1 deletions

View File

@ -377,7 +377,10 @@ bot.registerCommand('close', (msg, args) => {
getRandomLogFile(channelInfo.userId).then(logfile => { getRandomLogFile(channelInfo.userId).then(logfile => {
fs.writeFile(getLogFilePath(logfile), log, {encoding: 'utf8'}, err => { fs.writeFile(getLogFilePath(logfile), log, {encoding: 'utf8'}, err => {
getLogFileUrl(logfile).then(logurl => { getLogFileUrl(logfile).then(logurl => {
bot.createMessage(modMailGuild.id, `Log of modmail thread with ${channelInfo.name}:\n<${logurl}>`); const closeMessage = `Modmail thread with ${channelInfo.name} (${channelInfo.userId}) was closed by ${msg.author.mention}
Logs: <${logurl}>`;
bot.createMessage(modMailGuild.id, closeMessage);
delete modMailChannels[channelInfo.userId]; delete modMailChannels[channelInfo.userId];
msg.channel.delete(); msg.channel.delete();