This commit is contained in:
Jonny_Bro (Nikita) 2023-11-06 18:19:48 +05:00
parent 39f34d45ee
commit c72c7f9023

View file

@ -15,6 +15,8 @@ class CommandHandler extends BaseEvent {
* @param {import("discord.js").BaseInteraction} interaction * @param {import("discord.js").BaseInteraction} interaction
*/ */
async execute(client, 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 command = client.commands.get(interaction.commandName);
const data = []; const data = [];
@ -33,7 +35,6 @@ class CommandHandler extends BaseEvent {
if (interaction.isButton() && interaction.customId === "quote_delete" && interaction.message.deletable) return interaction.message.delete(); if (interaction.isButton() && interaction.customId === "quote_delete" && interaction.message.deletable) return interaction.message.delete();
if (interaction.type !== InteractionType.ApplicationCommand && !interaction.isCommand()) return; if (interaction.type !== InteractionType.ApplicationCommand && !interaction.isCommand()) return;
if (!interaction.guildId === "1039187019957555252") return interaction.error({ content: "IAT Only", ephemeral: true });
if (command.ownerOnly && interaction.user.id !== client.config.owner.id) return interaction.error("misc:OWNER_ONLY", null, { ephemeral: true }); if (command.ownerOnly && interaction.user.id !== client.config.owner.id) return interaction.error("misc:OWNER_ONLY", null, { ephemeral: true });
if (!userData.achievements.firstCommand.achieved) { if (!userData.achievements.firstCommand.achieved) {