Fix responding to bot replies
This commit is contained in:
parent
9fcddcaa28
commit
08c71e3a60
@ -1,11 +1,18 @@
|
|||||||
import 'dotenv/config.js';
|
import 'dotenv/config.js';
|
||||||
import { Events, Message, EmbedBuilder, User } from "discord.js";
|
import {
|
||||||
|
Events,
|
||||||
|
Message,
|
||||||
|
MessageType,
|
||||||
|
EmbedBuilder,
|
||||||
|
User
|
||||||
|
} from "discord.js";
|
||||||
import { DiscordClient } from '../discordClient';
|
import { DiscordClient } from '../discordClient';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: Events.MessageCreate,
|
name: Events.MessageCreate,
|
||||||
async execute(client: DiscordClient, message: Message) {
|
async execute(client: DiscordClient, message: Message) {
|
||||||
if (message.author.bot) return;
|
// 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.mentions.has(client.user as User)) {
|
||||||
const embeds = [
|
const embeds = [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user