cyberbot-v2
Version:
cyberbot, 基于napcat-ts, nodejs,轻量qq机器人框架。
9 lines (8 loc) • 332 B
TypeScript
import type { AllHandlers } from 'node-napcat-ts';
import { Bot } from '.';
export type EventHandler<T extends keyof AllHandlers> = (context: AllHandlers[T]) => void;
export type PluginModule = {
name: string;
handlers?: Record<string, EventHandler<any>[]>;
setup?: (bot: Bot) => Record<string, EventHandler<any>[]>;
};