aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-11 19:05:03 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-11 19:05:03 -0400
commit4c6e3585a623e25ef2489032b84eb4c9a998dc9d (patch)
treecb37dcf92e69383b0adfff3f3582f6ab188bed85 /src/lib/common
parent71e4999154956ea469d95f3d6a5711b2f0bb0fc3 (diff)
downloadtanzanite-4c6e3585a623e25ef2489032b84eb4c9a998dc9d.tar.gz
tanzanite-4c6e3585a623e25ef2489032b84eb4c9a998dc9d.tar.bz2
tanzanite-4c6e3585a623e25ef2489032b84eb4c9a998dc9d.zip
fix(hl): make channel and user blocks work
Diffstat (limited to 'src/lib/common')
-rw-r--r--src/lib/common/HighlightManager.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/common/HighlightManager.ts b/src/lib/common/HighlightManager.ts
index 6781f50..fffb266 100644
--- a/src/lib/common/HighlightManager.ts
+++ b/src/lib/common/HighlightManager.ts
@@ -61,6 +61,12 @@ export class HighlightManager {
if (!guildCache.get(word)) guildCache.set(word, new Set());
guildCache.get(word)!.add(highlight.user);
});
+
+ if (!this.userBlocks.has(highlight.guild)) this.userBlocks.set(highlight.guild, new Collection());
+ this.userBlocks.get(highlight.guild)!.set(highlight.user, new Set(...highlight.blacklistedUsers));
+
+ if (!this.channelBlocks.has(highlight.guild)) this.channelBlocks.set(highlight.guild, new Collection());
+ this.channelBlocks.get(highlight.guild)!.set(highlight.user, new Set(...highlight.blacklistedChannels));
}
}