aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 19:56:44 +0200
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 19:56:44 +0200
commit544f94704c9dd37913de11eab67cd594d17fcd87 (patch)
treefb270a01d11102ba590321ca215347fc20fc20b1 /src/lib/common
parent798dcb569a06a49d15b08c4eff2d893cafbe300b (diff)
downloadtanzanite-544f94704c9dd37913de11eab67cd594d17fcd87.tar.gz
tanzanite-544f94704c9dd37913de11eab67cd594d17fcd87.tar.bz2
tanzanite-544f94704c9dd37913de11eab67cd594d17fcd87.zip
fix(hl): ignore when user is already mentioned in the message
Diffstat (limited to 'src/lib/common')
-rw-r--r--src/lib/common/HighlightManager.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/common/HighlightManager.ts b/src/lib/common/HighlightManager.ts
index c917110..4346007 100644
--- a/src/lib/common/HighlightManager.ts
+++ b/src/lib/common/HighlightManager.ts
@@ -120,6 +120,14 @@ export class HighlightManager {
continue;
}
+ if (message.mentions.has(user)) {
+ void this.client.console.verbose(
+ 'Highlight',
+ `Highlight ignored because <<${user}>> is already mentioned in the message.`
+ );
+ continue;
+ }
+
ret.set(user, word);
}
}