Ignore errors from adding a reaction with reactOnSeen
parent
51df75e641
commit
7a671eab1f
|
@ -325,7 +325,7 @@ class Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.reactOnSeen) {
|
if (config.reactOnSeen) {
|
||||||
await msg.addReaction(config.reactOnSeenEmoji);
|
await msg.addReaction(config.reactOnSeenEmoji).catch(utils.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interrupt scheduled closing, if in progress
|
// Interrupt scheduled closing, if in progress
|
||||||
|
|
|
@ -310,13 +310,12 @@ function disableCodeBlocks(str) {
|
||||||
return str.replace(/`/g, "`\u200b");
|
return str.replace(/`/g, "`\u200b");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
function readMultilineConfigValue(str) {
|
function readMultilineConfigValue(str) {
|
||||||
return Array.isArray(str) ? str.join("\n") : str;
|
return Array.isArray(str) ? str.join("\n") : str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function noop() {}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
BotError,
|
BotError,
|
||||||
|
|
||||||
|
@ -355,4 +354,6 @@ module.exports = {
|
||||||
disableCodeBlocks,
|
disableCodeBlocks,
|
||||||
|
|
||||||
readMultilineConfigValue,
|
readMultilineConfigValue,
|
||||||
|
|
||||||
|
noop,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue