Something went wrong. Try again.
Yet another Fluxer bot built with TypeScript and Bun
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829import type { Client, Message } from "@fluxerjs/core";import type { ArgSchema, ParsedArgs } from "@/args";
export type { ParsedArgs };
/** Injected into every command's execute() call by the registry. */export interface BotContext { client: Client;}
export interface ICommand<TArgs extends ArgSchema = Record<string, never>> { /** * Declare your arg schema here. The registry reads this to parse and * validate raw string args before calling execute(). * * Entries can be: * - Our built-in helpers: arg.string(), arg.number(), arg.boolean(), arg.rest() * - Any Standard Schema compatible schema (Zod, Valibot, ArkType, etc.) — required by default * - arg.optional(zodSchema) — to make an external schema optional * * Omit entirely for commands that take no args. */ readonly args?: TArgs;
execute(ctx: BotContext, message: Message, args: ParsedArgs<TArgs>): Promise<void>;}
export type CommandCtor = new () => ICommand<ArgSchema>;