From ea238cf5d0ca82c531e8a75bcbb559a984d09b9e Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Fri, 4 Oct 2024 19:12:33 -0500 Subject: [PATCH] Fix anti-everyone --- src/components/anti-everyone.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/anti-everyone.ts b/src/components/anti-everyone.ts index 8ad61e21..86ee7c50 100644 --- a/src/components/anti-everyone.ts +++ b/src/components/anti-everyone.ts @@ -4,8 +4,9 @@ import { Wheatley } from "../wheatley.js"; import { colors, MINUTE, HOUR } from "../common.js"; import { SelfClearingMap } from "../utils/containers.js"; import { unwrap } from "../utils/misc.js"; +import { M } from "../utils/debugging-and-logging.js"; -const failed_everyone_re = /\b(?:@everyone|@here)\b/g; +const failed_everyone_re = /(?:@everyone|@here)\b/g; export interface AntiEveryoneMessageCache { reply_to: string; @@ -35,6 +36,7 @@ export default class AntiEveryone extends BotComponent { return; } if (message.content.match(failed_everyone_re) != null) { + M.log("AntiEveryone: Someone tried to mention here or everyone"); // NOTE: .toLocaleString("en-US") formats this number with commas. const member_count = this.wheatley.TCCPP.members.cache.size.toLocaleString("en-US");