fix: 查询评论报错 (#250)

Fixed #250
This commit is contained in:
shanmite 2023-02-12 15:27:26 +08:00
parent 52c6464650
commit 9c9bc18a44

View File

@ -601,12 +601,11 @@ class Monitor extends Searcher {
const copy_chat = getRandomOne(
(await bili.getChat(rid, chat_type))
.filter(it => !(new RegExp(copy_blockword.join('|')).test(it[1])))
);
) || [";;;;;;;;;", chat || "!!!"];
chat = copy_chat[1]
.replace(
new RegExp(copy_chat[0], 'g'),
global_var.get("myUNAME") || '')
|| "!!!"
}
status = await retryfn(