From b16ef7c36884e294523939de8a0bd3f20c6530f2 Mon Sep 17 00:00:00 2001 From: MrTuxedo Date: Fri, 21 Apr 2023 20:37:52 -0700 Subject: [PATCH] auto reply ignore roles and @everyone/@here --- src/events/message.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/events/message.ts b/src/events/message.ts index 5bedcde..99fdfa6 100644 --- a/src/events/message.ts +++ b/src/events/message.ts @@ -2,7 +2,6 @@ import 'dotenv/config.js'; import { Events, Message, - MessageType, EmbedBuilder, User } from "discord.js"; @@ -12,8 +11,12 @@ module.exports = { name: Events.MessageCreate, async execute(client: DiscordClient, message: Message) { // Don't respond to bots or replies - if (message.author.bot || message.type == MessageType.Reply) return; - if (message.mentions.has(client.user as User)) { + if (message.author.bot) return; + if (message.mentions.has(client.user as User, { + ignoreRoles: true, + ignoreRepliedUser: true, + ignoreEveryone: true + })) { const embeds = [ new EmbedBuilder() .setColor('#008000')