diff --git a/events/CommandHandler.js b/events/CommandHandler.js index 9669a51a..723538ac 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -12,11 +12,9 @@ class CommandHandler extends BaseEvent { /** * * @param {import("../base/Client")} client - * @param {import("discord.js").BaseInteraction} interaction + * @param {import("discord.js").CommandInteraction} interaction */ async execute(client, interaction) { - if (interaction.guildId !== "1039187019957555252") return interaction.error({ content: "IAT Only", ephemeral: true }); - const command = client.commands.get(interaction.commandName); const data = []; @@ -31,6 +29,7 @@ class CommandHandler extends BaseEvent { data.memberData = memberData; } + if (command.dirname.includes("IAT") && interaction.guildId !== "1039187019957555252") return interaction.reply({ content: "IAT Only", ephemeral: true }); if (interaction.isAutocomplete()) return await command.autocompleteRun(client, interaction); if (interaction.isButton() && interaction.customId === "quote_delete" && interaction.message.deletable) return interaction.message.delete(); if (interaction.type !== InteractionType.ApplicationCommand && !interaction.isCommand()) return;