Interfaces
The framework provides strictly typed TypeScript interfaces for all major components. You can import them directly from the interfaces path:
typescript
import type {
SlashCommand,
ContextMenuCommand,
Event,
ILoader
} from '@thezombiepl/zombieclient/interfaces';Commands
BaseCommand
The base properties shared by all commands.
typescript
interface BaseCommand {
data: ChatInputCommandBuilder | ContextMenuCommandBuilder;
dev?: boolean;
category?: string;
guild?: string | string[];
cooldown?: number;
}SlashCommand
Used for standard slash (/) commands.
typescript
interface SlashCommand extends BaseCommand {
data: ChatInputCommandBuilder;
execute(
client: ZombieClient,
interaction: ChatInputCommandInteraction,
): Promise<InteractionCallbackResponse | void>;
autocomplete?: (
client: ZombieClient,
interaction: AutocompleteInteraction,
) => Promise<InteractionCallbackResponse | void>;
}ContextMenuCommand
Used for User or Message context menu actions.
typescript
interface ContextMenuCommand extends BaseCommand {
data: ContextMenuCommandBuilder;
execute(
client: ZombieClient,
interaction: ContextMenuCommandInteraction,
): Promise<InteractionCallbackResponse | void>;
}Events
Event<T>
Used for Discord Gateway events. The generic T determines the strictly typed arguments in the execute method based on ClientEventTypes.
typescript
interface Event<T extends keyof ClientEventTypes> {
name: T;
once?: boolean;
execute(client: ZombieClient, ...args: ClientEventTypes[T]): Promise<void> | void;
}Loaders
ILoader
The base interface for any framework plugin.
typescript
interface ILoader {
readonly name: string;
load(): Promise<void>;
}FileLoaderOptions
Options passed to the FileLoader (can be customized via CommandLoader options).
typescript
interface FileLoaderOptions {
extensions?: string[]; // e.g., ['.js', '.ts']
ignore?: string[]; // Glob patterns
resolved?: boolean; // Return absolute paths
}