2024-10-07 16:31:42 [I] j-integral 欢迎使用积分系统
2024-10-07 16:31:42 [I] j-integral 开始初始化
2024-10-07 16:31:42 [I] j-integral 开始初始化数据库
2024-10-07 16:31:42 [W] app Error: property database is not registered, declare it as `inject` to suppress this warning
at Object.apply (D:\bot\koishi\koishi-app\external\j-integral\src\index.ts:32:9)
at MainScope.apply (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:362:26)
at <anonymous> (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:389:49)
at MainScope.ensure (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:150:18)
at MainScope.start (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:389:12)
at MainScope.init (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:189:12)
at new MainScope (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:327:12)
at Proxy.plugin (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\registry.ts:207:15)
at Proxy.forkPlugin (D:\bot\koishi\koishi-app\node_modules\@koishijs\loader\src\shared.ts:313:19)
2024-10-07 16:31:43 [E] app TypeError: Cannot read properties of undefined (reading 'extend')
at Object.apply (D:\bot\koishi\koishi-app\external\j-integral\src\index.ts:32:18)
at MainScope.apply (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:362:26)
at <anonymous> (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:389:49)
at MainScope.ensure (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:150:18)
at MainScope.start (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:389:12)
at MainScope.init (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:189:12)
at new MainScope (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:327:12)
at Proxy.plugin (D:\bot\koishi\koishi-app\node_modules\@cordisjs\core\src\registry.ts:207:15)
at Proxy.forkPlugin (D:\bot\koishi\koishi-app\node_modules\@koishijs\loader\src\shared.ts:313:19)
at async Proxy.reload (D:\bot\koishi\koishi-app\node_modules\@koishijs\loader\src\shared.ts:343:16)
可能出现错误的代码:
logger.info('欢迎使用积分系统');
logger.info('开始初始化');
logger.info('开始初始化数据库');
ctx.database.extend("users",{ID: "string", integral: "string", grade: "string", FinalSignin: "string"},{primary: "ID" });
logger.info('初始化users数据库成功');
ctx.database.extend("config",{name: "string", value: "string",},{primary: "name" });
logger.info('初始化config数据库成功');
系统信息
数据库可以正常创建
就是不知道为啥报错