fix: 仅在评论需要验证码时退出(#175)

Fixed #175
This commit is contained in:
shanmite 2022-08-15 15:28:45 +08:00
parent 3491888f88
commit aae3de84f4

View File

@ -107,8 +107,10 @@ class Monitor extends Searcher {
status = 0, status = 0,
is_exception = 0, is_exception = 0,
is_outof_maxfollow = 0, is_outof_maxfollow = 0,
relayed_nums = 0; relayed_nums = 0,
total_nums = 0;
for (const [index, lottery] of shuffle(allLottery).entries()) { for (const [index, lottery] of shuffle(allLottery).entries()) {
total_nums += 1;
let is_shutdown = false; let is_shutdown = false;
if ( if (
is_outof_maxfollow is_outof_maxfollow
@ -173,9 +175,6 @@ class Monitor extends Searcher {
break; break;
case 1002: case 1002:
case 1003: case 1003:
case 1004:
is_shutdown = true;
break;
case 1005: case 1005:
case 1006: case 1006:
case 1007: case 1007:
@ -197,6 +196,7 @@ class Monitor extends Searcher {
is_outof_maxfollow = 2005 is_outof_maxfollow = 2005
break; break;
case 1001: case 1001:
case 1004:
case 2001: case 2001:
case 3001: case 3001:
case 5001: case 5001:
@ -210,7 +210,7 @@ class Monitor extends Searcher {
await delay(wait * (Math.random() + 0.5)); await delay(wait * (Math.random() + 0.5));
} }
log.info('抽奖', `本轮共转发${relayed_nums}`); log.info('抽奖', `本轮共处理${total_nums}条,成功参与${relayed_nums}`);
return is_exception return is_exception
|| is_outof_maxfollow || is_outof_maxfollow
|| status || status