fix: 评论包含敏感词(#150)

Fixed #150
This commit is contained in:
shanmite 2022-05-03 09:55:53 +08:00
parent 0eddee4f15
commit f329457c9a
2 changed files with 13 additions and 1 deletions

View File

@ -545,6 +545,14 @@ class Monitor extends Searcher {
)
)
if (status === 8) {
status = await bili.sendChat(
rid,
"[doge]",
chat_type
)
}
if (status) {
log.warn("抽奖信息", `dyid: ${dyid}, rid: ${rid}, chat_type: ${chat_type}`)
return 1000 + status

View File

@ -951,6 +951,7 @@ const bili_client = {
* - 已被对方拉入黑名单 5
* - 黑名单用户无法互动 6
* - UP主已关闭评论区 7
* - 评论内容包含敏感信息 8
*/
async sendChat(rid, msg, type) {
const
@ -966,7 +967,7 @@ const bili_client = {
res = strToJson(responseText);
switch (res.code) {
case 0:
log.info('自动评论', '评论成功');
log.info('自动评论', `评论成功: ${msg}`);
return 0;
case -404:
log.error('自动评论', '原动态已删除');
@ -986,6 +987,9 @@ const bili_client = {
case 12061:
log.error('自动评论', 'UP主已关闭评论区');
return 7;
case 12016:
log.error('自动评论', '评论内容包含敏感信息');
return 8;
default:
log.error('自动评论', `未知错误\n${responseText}`);
return 1;