typescript error

Type 'Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">' is missing the following properties from type 'SlashCommandBuilder': addSubcommandGroup, addSubcommand, _sharedAddOptionMethodts(2739)
handler.d.ts(10, 3): The expected type comes from property 'command' which is declared here on type 'SlashCommand'

import {
  AutocompleteInteraction,
  ChatInputCommandInteraction,
  Client,
  ModalSubmitInteraction,
  SlashCommandBuilder,
} from "discord.js";
export interface SlashCommand {
  command: SlashCommandBuilder;
  execute: (interaction: ChatInputCommandInteraction) => void;
  autocomplete?: (interaction: AutocompleteInteraction) => void;
  modal?: (interaction: ModalSubmitInteraction<CacheType>) => void;
}
Was this page helpful?