fix: 关注UP主7天以上的人可发评论(#192)

Fixed #192
This commit is contained in:
shanmite 2022-09-11 17:12:50 +08:00
parent 4f8f50f90b
commit c8e1a328ec
3 changed files with 11 additions and 1 deletions

View File

@ -184,6 +184,7 @@ class Monitor extends Searcher {
case 1008: case 1008:
case 1009: case 1009:
case 1010: case 1010:
case 1011:
case 2002: case 2002:
case 2003: case 2003:
case 4001: case 4001:
@ -532,6 +533,7 @@ class Monitor extends Searcher {
* - 评论 内容包含敏感信息 1008 * - 评论 内容包含敏感信息 1008
* - 评论 重复评论 1009 * - 评论 重复评论 1009
* - 评论 帐号未登录 1010 * - 评论 帐号未登录 1010
* - 评论 关注UP主7天以上的人可发评论 1011
* - 关注 未知错误 2001 * - 关注 未知错误 2001
* - 关注 您已被对方拉入黑名单 2002 * - 关注 您已被对方拉入黑名单 2002
* - 关注 黑名单用户无法关注 2003 * - 关注 黑名单用户无法关注 2003

View File

@ -984,6 +984,7 @@ const bili_client = {
* - 评论内容包含敏感信息 8 * - 评论内容包含敏感信息 8
* - 重复评论 9 * - 重复评论 9
* - 帐号未登录 10 * - 帐号未登录 10
* - 关注UP主7天以上的人可发评论 11
*/ */
async sendChat(rid, msg, type) { async sendChat(rid, msg, type) {
const const
@ -1028,6 +1029,9 @@ const bili_client = {
case -101: case -101:
log.error('自动评论', '帐号未登录'); log.error('自动评论', '帐号未登录');
return 10; return 10;
case 12078:
log.error('自动评论', '关注UP主7天以上的人可发评论');
return 11;
default: default:
log.error('自动评论', `未知错误\n${responseText}`); log.error('自动评论', `未知错误\n${responseText}`);
return 1; return 1;

View File

@ -24,8 +24,12 @@ const util = require('./util');
1), 1),
3 3
) )
}, async () => { },
async () => {
assert.notEqual((await bili_client.searchArticlesByKeyword("专栏")).length, 0) assert.notEqual((await bili_client.searchArticlesByKeyword("专栏")).length, 0)
},
async () => {
assert.notEqual(await bili_client.sendChat("703886913053917267", "t", 17), 1)
} }
]) ])