🗑️ deprecate moduleData and metadata

This commit is contained in:
Axel Olausson Holtenäs 2022-10-21 15:49:11 +02:00
parent a3ac4ca7fa
commit ab7043d75f
2 changed files with 1 additions and 6 deletions

View file

@ -1,6 +1,5 @@
// Dependencies
import { ChatInputCommandInteraction } from "discord.js";
import getCommandMetadata from "../../../../helpers/getCommandMetadata";
export default async (interaction: ChatInputCommandInteraction) => {
if (!interaction.isCommand()) return;
@ -9,7 +8,7 @@ export default async (interaction: ChatInputCommandInteraction) => {
const currentCommand = client.commands.get(commandName);
if (!currentCommand) throw new Error(`Unknown command ${commandName}`);
const metadata = await getCommandMetadata(interaction, currentCommand);
// const metadata = await getCommandMetadata(interaction, currentCommand);
// await deferReply(interaction, metadata.ephemeral || false);
// if (metadata.guildOnly && !interaction.guild)

View file

@ -21,10 +21,6 @@ export const register = async (client: Client) => {
throw new Error(
`📦 No command builder found while importing "${commandName}"`
);
if (!command.moduleData)
throw new Error(
`📦 No command moduleData found while importing "${commandName}"`
);
// Add command to collection
client.commands.set(command.builder.name, command);