Fix certain auto-reply errors
parent
327d1f4b2a
commit
dcd80aabda
|
@ -178,7 +178,7 @@ async function createNewThreadForUser(user, quiet = false, ignoreRequirements =
|
||||||
const responseMessage = utils.readMultilineConfigValue(config.responseMessage);
|
const responseMessage = utils.readMultilineConfigValue(config.responseMessage);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await newThread._sendDMToUser(responseMessage);
|
await newThread.postToUser(responseMessage);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
responseMessageError = err;
|
responseMessageError = err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ module.exports = ({ bot, knex, config, commands }) => {
|
||||||
// Send close message (unless suppressed with a silent close)
|
// Send close message (unless suppressed with a silent close)
|
||||||
if (hasCloseMessage && ! silentClose) {
|
if (hasCloseMessage && ! silentClose) {
|
||||||
const closeMessage = utils.readMultilineConfigValue(config.closeMessage);
|
const closeMessage = utils.readMultilineConfigValue(config.closeMessage);
|
||||||
await thread._sendDMToUser(closeMessage).catch(() => {});
|
await thread.postToUser(closeMessage).catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
const logUrl = await thread.getLogUrl();
|
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`);
|
console.log(`[INFO] Auto-closing thread with ${thread.user_name} because the channel was deleted`);
|
||||||
if (config.closeMessage) {
|
if (config.closeMessage) {
|
||||||
const closeMessage = utils.readMultilineConfigValue(config.closeMessage);
|
const closeMessage = utils.readMultilineConfigValue(config.closeMessage);
|
||||||
await thread._sendDMToUser(closeMessage).catch(() => {});
|
await thread.postToUser(closeMessage).catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
await thread.close(true);
|
await thread.close(true);
|
||||||
|
|
Loading…
Reference in New Issue