From bee147c19da8179fb013f76ca95293e57244fe7d Mon Sep 17 00:00:00 2001 From: Dragory Date: Wed, 6 Mar 2019 21:36:17 +0200 Subject: [PATCH] Allow !loglink in suspended threads --- src/modules/logs.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/logs.js b/src/modules/logs.js index 90594e3..f0c9d89 100644 --- a/src/modules/logs.js +++ b/src/modules/logs.js @@ -47,7 +47,11 @@ module.exports = bot => { }); addInboxServerCommand('loglink', async (msg, args, thread) => { - if (! thread) return; + if (! thread) { + thread = await threads.findSuspendedThreadByChannelId(msg.channel.id); + if (! thread) return; + } + const logUrl = await thread.getLogUrl(); thread.postSystemMessage(`Log URL: ${logUrl}`); });