diff --git a/src/commands/dns/index.ts b/src/commands/dns/index.ts index 551814b..cd5f9ec 100644 --- a/src/commands/dns/index.ts +++ b/src/commands/dns/index.ts @@ -1,20 +1,21 @@ import { SlashCommandBuilder } from "@discordjs/builders"; import { ChatInputCommandInteraction } from "discord.js"; -import modules from "./modules"; -export const moduleData = modules; +// Modules +import moduleLookup from "./modules/lookup"; export const builder = new SlashCommandBuilder() .setName("dns") .setDescription("DNS commands.") - .addSubcommand(modules.lookup.builder); + // Modules + .addSubcommand(moduleLookup.builder); // Execute the command export const execute = async (interaction: ChatInputCommandInteraction) => { switch (interaction.options.getSubcommand()) { case "lookup": - await modules.lookup.execute(interaction); + await moduleLookup.execute(interaction); break; default: throw new Error( diff --git a/src/commands/dns/modules/index.ts b/src/commands/dns/modules/index.ts deleted file mode 100644 index 92a80ac..0000000 --- a/src/commands/dns/modules/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import lookup from "./lookup"; - -export default { lookup }; diff --git a/src/commands/dns/modules/lookup/index.ts b/src/commands/dns/modules/lookup/index.ts index afa51a6..b64c18f 100644 --- a/src/commands/dns/modules/lookup/index.ts +++ b/src/commands/dns/modules/lookup/index.ts @@ -1,11 +1,10 @@ import { SlashCommandSubcommandBuilder } from "@discordjs/builders"; import axios from "axios"; import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js"; +import deferReply from "../../../../handlers/deferReply"; import getEmbedConfig from "../../../../helpers/getEmbedData"; export default { - metadata: { guildOnly: false, ephemeral: false }, - builder: (command: SlashCommandSubcommandBuilder) => { return command .setName("lookup") @@ -20,6 +19,8 @@ export default { ); }, execute: async (interaction: ChatInputCommandInteraction) => { + await deferReply(interaction, false); + const { errorColor, successColor, footerText, footerIcon } = await getEmbedConfig(interaction.guild); const embedTitle = "[:hammer:] Utility (Lookup)";