UNPKG

@gwigz/homunculus-bot

Version:

A bot framework for creating Second Life bots with chat commands and LSL communication

21 lines (20 loc) 875 B
import type { Client } from "@gwigz/homunculus-core"; import type { ZodType } from "zod/v4"; import { type ApiHandlerOptions } from "./api"; import { type CommandHandlerOptions } from "./commands"; type Format = "json" | "string"; export interface BotOptions { commandPrefix: string; apiPrefix?: string; apiSeparator?: string; apiChannel?: number; onError?: ((error: unknown) => void) | false; } export declare class Bot { private commandHandler; private apiHandler; constructor(client: Client, options: BotOptions); registerCommand<F extends Format = "string", Schema extends ZodType<any, any> | undefined = undefined>(command: CommandHandlerOptions<F, Schema>): void; registerApiHandler<F extends Format = "string", Schema extends ZodType<any, any> | undefined = undefined>(handler: ApiHandlerOptions<F, Schema>): void; } export {};