auto reply ignore roles and @everyone/@here
This commit is contained in:
parent
8b06d7dbdf
commit
b16ef7c368
@ -2,7 +2,6 @@ import 'dotenv/config.js';
|
|||||||
import {
|
import {
|
||||||
Events,
|
Events,
|
||||||
Message,
|
Message,
|
||||||
MessageType,
|
|
||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
User
|
User
|
||||||
} from "discord.js";
|
} from "discord.js";
|
||||||
@ -12,8 +11,12 @@ module.exports = {
|
|||||||
name: Events.MessageCreate,
|
name: Events.MessageCreate,
|
||||||
async execute(client: DiscordClient, message: Message) {
|
async execute(client: DiscordClient, message: Message) {
|
||||||
// Don't respond to bots or replies
|
// Don't respond to bots or replies
|
||||||
if (message.author.bot || message.type == MessageType.Reply) return;
|
if (message.author.bot) return;
|
||||||
if (message.mentions.has(client.user as User)) {
|
if (message.mentions.has(client.user as User, {
|
||||||
|
ignoreRoles: true,
|
||||||
|
ignoreRepliedUser: true,
|
||||||
|
ignoreEveryone: true
|
||||||
|
})) {
|
||||||
const embeds = [
|
const embeds = [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setColor('#008000')
|
.setColor('#008000')
|
||||||
|
Loading…
Reference in New Issue
Block a user