Files
joel/src/commands/types.ts
2026-02-26 14:45:57 +01:00

32 lines
586 B
TypeScript

/**
* Command types and interfaces
*/
import type {
CacheType,
ChatInputCommandInteraction,
} from "discord.js";
export interface CommandData {
name: string;
toJSON: () => unknown;
}
export interface Command {
/** The command definition for Discord */
data: CommandData;
/** Execute the command */
execute: (interaction: ChatInputCommandInteraction<CacheType>) => Promise<void>;
/** Optional: Command category for organization */
category?: CommandCategory;
}
export type CommandCategory =
| "fun"
| "utility"
| "moderation"
| "ai"
| "debug";