NodeMiraiPlugins / NodeMiraiFGOGacha

基于node-mirai-sdk的FGO扭蛋模拟插件
2 stars 1 forks source link

运行出错 #6

Open sayri23 opened 3 years ago

sayri23 commented 3 years ago

IMG_20210509_093334 请问如何解决

sayri23 commented 3 years ago

安装依赖后解决了上面的问题,但是再第一次运行时自动更新了资源后就退出了,再运行也没反应

RedBeanN commented 3 years ago

安装依赖后解决了上面的问题,但是再第一次运行时自动更新了资源后就退出了,再运行也没反应

直接退出应该是 node-mirai-sdk 没有配置好

sayri23 commented 3 years ago

安装依赖后解决了上面的问题,但是再第一次运行时自动更新了资源后就退出了,再运行也没反应

直接退出应该是 node-mirai-sdk 没有配置好

额 请问这个应该如何配置,需要打开哪些模块?

sayri23 commented 3 years ago

IMG_20210523_204917 每次都是这样😂下载完就直接退出了,不知道怎么搞

RedBeanN commented 3 years ago

IMG_20210523_204917 每次都是这样😂下载完就直接退出了,不知道怎么搞

// node-mirai-sdk 的配置
const bot = new Mirai(...);
bot.on('authed', () => {
  bot.verify();
});
bot.listen('all');

// FGOGacha 的配置
bot.use(FGOGacha(...));
sayri23 commented 3 years ago

这是在index.js里的代码?好像没找到。。。

sayri23 commented 3 years ago

可以写个详细点的教程吗😂

sayri23 commented 3 years ago

请问这个怎么解决,是 /home/lighthouse/fgogacha/index.js:208

SyntaxError: Unexpected end of input at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47

RedBeanN commented 3 years ago

请问这个怎么解决,是 /home/lighthouse/fgogacha/index.js:208

SyntaxError: Unexpected end of input at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47

看你自己的index.js第208行

sayri23 commented 3 years ago

MB{54~38V_JFDKR$V%I~NLX

sayri23 commented 3 years ago

请问这个怎么解决,是 /home/lighthouse/fgogacha/index.js:208 SyntaxError: Unexpected end of input at wrapSafe (internal/modules/cjs/loader.js:979:16) at Module._compile (internal/modules/cjs/loader.js:1027:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47

看你自己的index.js第208行

跑起来了但是只要superadmin可以设置卡池,群员们不行

sayri23 commented 3 years ago

[init] Ready to init [NodeMirai] Installed plugin [ NodeMiraiFgoGacha ] Failed @ auth: Invalid host [init] Downloaded bg-mc-icon.png [init] Downloading https://fgo.wiki/w/%E6%8A%BD%E5%8D%A1%E6%A8%A1%E6%8B%9F%E5%99%A8 for pools.json [init] Saved pools.json [init] Downloading pools for gacha.json and icons.json (node:2592525) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at getGachaPools (/home/lighthouse/bot/NodeMiraiFGOGacha-master/src/getGachaPools.js:41:65) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async init (/home/lighthouse/bot/NodeMiraiFGOGacha-master/init.js:47:3) (Use node --trace-warnings ... to show where the warning was created) (node:2592525) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:2592525) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 请问下载资源时出错如何解决

RedBeanN commented 3 years ago

[init] Ready to init [NodeMirai] Installed plugin [ NodeMiraiFgoGacha ] Failed @ auth: Invalid host [init] Downloaded bg-mc-icon.png [init] Downloading https://fgo.wiki/w/%E6%8A%BD%E5%8D%A1%E6%A8%A1%E6%8B%9F%E5%99%A8 for pools.json [init] Saved pools.json [init] Downloading pools for gacha.json and icons.json (node:2592525) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at getGachaPools (/home/lighthouse/bot/NodeMiraiFGOGacha-master/src/getGachaPools.js:41:65) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async init (/home/lighthouse/bot/NodeMiraiFGOGacha-master/init.js:47:3) (Use node --trace-warnings ... to show where the warning was created) (node:2592525) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:2592525) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 请问下载资源时出错如何解决

更新插件即可

npm i -S node-mirai-fgo-gacha@latest