pnp-scheduler/source/Discord/Commands/Command.ts
2025-06-18 22:53:54 +02:00

16 lines
No EOL
478 B
TypeScript

import {ChatInputCommandInteraction, Interaction, SlashCommandBuilder} from "discord.js";
export interface Command {
definition(): SlashCommandBuilder;
}
export interface ChatInteractionCommand {
execute(interaction: ChatInputCommandInteraction): Promise<void>;
}
export interface AutocompleteCommand {
handleAutocomplete(interaction: Interaction): Promise<void>;
}
export type CommandUnion =
Command | Partial<ChatInteractionCommand> | Partial<AutocompleteCommand>;