Ignore errors from adding a reaction with reactOnSeen

cshd
Dragory 2020-08-16 18:45:11 +03:00
parent 51df75e641
commit 7a671eab1f
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 5 additions and 4 deletions

View File

@ -325,7 +325,7 @@ class Thread {
}
if (config.reactOnSeen) {
await msg.addReaction(config.reactOnSeenEmoji);
await msg.addReaction(config.reactOnSeenEmoji).catch(utils.noop);
}
// Interrupt scheduled closing, if in progress

View File

@ -310,13 +310,12 @@ function disableCodeBlocks(str) {
return str.replace(/`/g, "`\u200b");
}
/**
*
*/
function readMultilineConfigValue(str) {
return Array.isArray(str) ? str.join("\n") : str;
}
function noop() {}
module.exports = {
BotError,
@ -355,4 +354,6 @@ module.exports = {
disableCodeBlocks,
readMultilineConfigValue,
noop,
};