import { SlashCommandBuilder, CommandInteraction, PermissionFlagsBits, } from 'discord.js'; export interface Component{ execute(interaction: unknown): Promise; build(): unknown; }; export abstract class Command implements Component{ abstract get name(): string; abstract get description(): string; abstract execute(interaction: CommandInteraction): Promise; build(): SlashCommandBuilder | Omit< SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup" >{ return new SlashCommandBuilder() .setName(this.name) .setDescription(this.description) .setDefaultMemberPermissions(PermissionFlagsBits.SendMessages); } };