diff --git a/README.md b/README.md index 25d9fdc3..ae6800b8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ ✅支持敏感词过滤,避免账号风险 - 难以监测机器人与用户对话时的内容,故引入此功能以减少机器人风险 - - 加入了百度云内容审核,在`config.py`中修改`check`的值,并填写`baidu_api_key`和`baidu_secret_key`以开启此功能 + - 加入了百度云内容审核,在`config.py`中修改`baidu_check`的值,并填写`baidu_api_key`和`baidu_secret_key`以开启此功能 - 编辑`sensitive.json`,并在`config.py`中修改`sensitive_word_filter`的值以开启此功能 diff --git a/config-template.py b/config-template.py index b73bc871..c3603b39 100644 --- a/config-template.py +++ b/config-template.py @@ -107,7 +107,7 @@ ignore_rules = { sensitive_word_filter = True #是否启动百度云内容安全审核 -check = False +baidu_check = False #百度云API_KEY 24位英文数字字符串 baidu_api_key = "" diff --git a/pkg/qqbot/filter.py b/pkg/qqbot/filter.py index e670aa22..1878c083 100644 --- a/pkg/qqbot/filter.py +++ b/pkg/qqbot/filter.py @@ -2,7 +2,7 @@ import re import requests import json -from config import check, baidu_api_key, baidu_secret_key, illgalmessage +from config import baidu_check, baidu_api_key, baidu_secret_key, illgalmessage import logging @@ -32,7 +32,7 @@ class ReplyFilter: def process(self, message: str) -> str: # 百度云审核 - if check: + if baidu_check: # 百度云审核 payload = "text=" + message logging.info("向百度云发送:" + payload)