16 lines
No EOL
488 B
TypeScript
16 lines
No EOL
488 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>; |