Allow !loglink in suspended threads

master
Dragory 2019-03-06 21:36:17 +02:00
parent d0b9ef851f
commit bee147c19d
1 changed files with 5 additions and 1 deletions

View File

@ -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}`);
});