From 3959eae9dc37055786a8a917b40ccc75a9887df8 Mon Sep 17 00:00:00 2001 From: shanmite <1971513084@qq.com> Date: Sun, 18 Apr 2021 20:39:01 +0800 Subject: [PATCH] fix(lottery-in-nodejs.js): [29:28] --- lib/Public.js | 1 + lib/lottery-in-nodejs.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Public.js b/lib/Public.js index bb5a1bc..3b48549 100644 --- a/lib/Public.js +++ b/lib/Public.js @@ -193,6 +193,7 @@ class Public { if (_modify === null) return null; mDRdata.push.apply(mDRdata, _modify.modifyDynamicResArray); next_offset = _modify.nextinfo.next_offset; + await Base.delay(500); } const fomatdata = mDRdata.map(o => { const hasOrigin = o.type === 1; diff --git a/lib/lottery-in-nodejs.js b/lib/lottery-in-nodejs.js index 7d137f9..cce8c36 100644 --- a/lib/lottery-in-nodejs.js +++ b/lib/lottery-in-nodejs.js @@ -26,7 +26,7 @@ function start() { return new Promise((_resolve) => { if (config.create_dy === '1') { Public.prototype.checkAllDynamic(GlobalVar.myUID, 1).then(Dynamic => { - if (Dynamic.allModifyDynamicResArray[0].type === 1) { + if ((Dynamic.allModifyDynamicResArray[0] || { type: 1 }).type === 1) { BiliAPI.createDynamic(Base.getRandomStr(config.dy_contents)).then(_resolve) } else { Base.tooltip.log('已有一条非转发动态故无需创建');