diff --git a/src/modules/logs.js b/src/modules/logs.js index 5599bd8..fca9b0c 100644 --- a/src/modules/logs.js +++ b/src/modules/logs.js @@ -2,6 +2,7 @@ const threads = require("../data/threads"); const moment = require("moment"); const utils = require("../utils"); const { getLogUrl, getLogFile, getLogCustomResponse, saveLogToStorage } = require("../data/logs"); +const { THREAD_STATUS } = require("../data/constants"); const LOG_LINES_PER_PAGE = 10; @@ -95,6 +96,11 @@ module.exports = ({ bot, knex, config, commands, hooks }) => { return; } + if (thread.status === THREAD_STATUS.OPEN) { + msg.channel.createMessage(`This thread's logs are not currently available, but it's open at <#${thread.channel_id}>`); + return; + } + msg.channel.createMessage("This thread's logs are not currently available"); };