From dcd80aabdafbf3cbc3601cc26a88677320c15db8 Mon Sep 17 00:00:00 2001 From: Brayzure Date: Mon, 20 Jan 2020 13:32:40 -0700 Subject: [PATCH] Fix certain auto-reply errors --- src/data/threads.js | 2 +- src/modules/close.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/threads.js b/src/data/threads.js index da61715..6e700b0 100644 --- a/src/data/threads.js +++ b/src/data/threads.js @@ -178,7 +178,7 @@ async function createNewThreadForUser(user, quiet = false, ignoreRequirements = const responseMessage = utils.readMultilineConfigValue(config.responseMessage); try { - await newThread._sendDMToUser(responseMessage); + await newThread.postToUser(responseMessage); } catch (err) { responseMessageError = err; } diff --git a/src/modules/close.js b/src/modules/close.js index 9b3463d..b3e7421 100644 --- a/src/modules/close.js +++ b/src/modules/close.js @@ -118,7 +118,7 @@ module.exports = ({ bot, knex, config, commands }) => { // Send close message (unless suppressed with a silent close) if (hasCloseMessage && ! silentClose) { const closeMessage = utils.readMultilineConfigValue(config.closeMessage); - await thread._sendDMToUser(closeMessage).catch(() => {}); + await thread.postToUser(closeMessage).catch(() => {}); } const logUrl = await thread.getLogUrl(); @@ -139,7 +139,7 @@ module.exports = ({ bot, knex, config, commands }) => { console.log(`[INFO] Auto-closing thread with ${thread.user_name} because the channel was deleted`); if (config.closeMessage) { const closeMessage = utils.readMultilineConfigValue(config.closeMessage); - await thread._sendDMToUser(closeMessage).catch(() => {}); + await thread.postToUser(closeMessage).catch(() => {}); } await thread.close(true);