32 lines
586 B
TypeScript
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";
|