2023-08-06 23:23:36 [W] app TypeError: Cannot read properties of undefined (reading 'includes')
at <anonymous> (/home/fantastic-spoon/node_modules/@koishijs/core/src/permission.ts:126:36)
at Array.some (<anonymous>)
at _Permissions.test (/home/fantastic-spoon/node_modules/@koishijs/core/src/permission.ts:126:19)
at _Session.<anonymous> (/home/fantastic-spoon/node_modules/@koishijs/core/src/command/validate.ts:21:32)
at _Lifecycle.serial (/home/fantastic-spoon/node_modules/cordis/src/events.ts:106:37)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at _Command.execute (/home/fantastic-spoon/node_modules/@koishijs/core/src/command/command.ts:270:22)
at <anonymous> (/home/fantastic-spoon/node_modules/@koishijs/core/src/session.ts:401:22)
at _Session.withScope (/home/fantastic-spoon/node_modules/@koishijs/core/src/session.ts:268:22)
奇怪的问题 插件源码 有时在discord触发代码中的指令 mcs 时控制台会出现错误:
在出现了这个问题后哪怕重启也不行,得重新安装koishi(重新创建模板项目) 在碰到问题前干过什么: ctrl-c关闭模板koishi, 进入 external/ , 使用git clone导入我的插件代码, 重命名clone来的文件夹, 返回koishi根目录, 执行 yarn , 然后yarn dev
经测试telegram, onebot平台没有这个问题,只在discord上碰到过,而且碰到两次都是在koishi版本为4.14.0上
如需更多信息我随时补充