Skip to content

Instantly share code, notes, and snippets.

View faithleysath's full-sized avatar
😴
sleeping

吴天一 faithleysath

😴
sleeping
  • Nanjing University of Information Science and Technology (南京信息工程大学) (NUIST)
  • 12:56 (UTC +08:00)
View GitHub Profile
@faithleysath
faithleysath / index.ts
Created January 17, 2026 12:19
index.ts
import { writeFileSync } from 'node:fs';
import { createActionMap } from 'napcat-onebot/action/index';
import { ActionName } from 'napcat-onebot/action/router';
// 1. 制造 Mock 对象 (防止实例化报错)
// 使用 Proxy 拦截所有属性读取,返回空函数或空对象
const mockCore = new Proxy({}, {
get: () => new Proxy({}, { get: () => () => { } })
}) as any;