修复主动思考回复奇怪格式的问题,修改napcat插件遗留配置项
This commit is contained in:
@@ -154,7 +154,7 @@ class ResponseHandler:
|
|||||||
|
|
||||||
if isinstance(data, list):
|
if isinstance(data, list):
|
||||||
data = "".join(map(str, data))
|
data = "".join(map(str, data))
|
||||||
reply_text += data
|
reply_text += data.get("data",{}).get("text","")
|
||||||
|
|
||||||
# 如果是主动思考且内容为“沉默”,则不发送
|
# 如果是主动思考且内容为“沉默”,则不发送
|
||||||
if is_proactive_thinking and data.strip() == "沉默":
|
if is_proactive_thinking and data.strip() == "沉默":
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class NoticeHandler:
|
|||||||
sub_type = raw_message.get("sub_type")
|
sub_type = raw_message.get("sub_type")
|
||||||
match sub_type:
|
match sub_type:
|
||||||
case NoticeType.Notify.poke:
|
case NoticeType.Notify.poke:
|
||||||
if config_api.get_plugin_config(self.plugin_config, "features.poke_enabled", True) and await message_handler.check_allow_to_chat(
|
if config_api.get_plugin_config(self.plugin_config, "features.enable_poke", True) and await message_handler.check_allow_to_chat(
|
||||||
user_id, group_id, False, False
|
user_id, group_id, False, False
|
||||||
):
|
):
|
||||||
logger.debug("处理戳一戳消息")
|
logger.debug("处理戳一戳消息")
|
||||||
@@ -247,7 +247,7 @@ class NoticeHandler:
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
# 如果配置为忽略不是针对自己的戳一戳,则直接返回None
|
# 如果配置为忽略不是针对自己的戳一戳,则直接返回None
|
||||||
if config_api.get_plugin_config(self.plugin_config, "features.non_self_poke_ignored", False):
|
if config_api.get_plugin_config(self.plugin_config, "features.ignore_non_self_poke", False):
|
||||||
logger.debug("忽略不是针对自己的戳一戳消息")
|
logger.debug("忽略不是针对自己的戳一戳消息")
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user