Skip to content

Commit

Permalink
Fix anti-everyone
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Oct 5, 2024
1 parent 2e855a3 commit ea238cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/anti-everyone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");

Expand Down

0 comments on commit ea238cf

Please sign in to comment.