refactor(chat): 更新判断群聊消息的属性以适配新结构

This commit is contained in:
minecraft1024a
2025-09-23 21:28:30 +08:00
parent 68bf0972df
commit ff72181649

View File

@@ -190,7 +190,7 @@ class ChatBot:
try: try:
# 检查聊天类型限制 # 检查聊天类型限制
if not plus_command_instance.is_chat_type_allowed(): if not plus_command_instance.is_chat_type_allowed():
is_group = hasattr(message, "is_group_message") and message.is_group_message is_group = message.message_info.group_info
logger.info( logger.info(
f"PlusCommand {plus_command_class.__name__} 不支持当前聊天类型: {'群聊' if is_group else '私聊'}" f"PlusCommand {plus_command_class.__name__} 不支持当前聊天类型: {'群聊' if is_group else '私聊'}"
) )