Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -82,10 +82,9 @@ class ChatBot:
|
||||
logger.debug(f"用户{userinfo.user_id}被禁止回复")
|
||||
return
|
||||
|
||||
if groupinfo:
|
||||
if groupinfo.group_id not in global_config.talk_allowed_groups:
|
||||
logger.trace(f"群{groupinfo.group_id}被禁止回复")
|
||||
return
|
||||
if groupinfo != None and groupinfo.group_id not in global_config.talk_allowed_groups:
|
||||
logger.debug(f"群{groupinfo.group_id}被禁止回复")
|
||||
return
|
||||
|
||||
if message.message_info.template_info and not message.message_info.template_info.template_default:
|
||||
template_group_name = message.message_info.template_info.template_name
|
||||
|
||||
@@ -8,9 +8,14 @@ from typing import Dict, Optional
|
||||
from ...common.database import db
|
||||
from ..message.message_base import GroupInfo, UserInfo
|
||||
|
||||
from src.common.logger import get_module_logger
|
||||
from src.common.logger import get_module_logger, LogConfig, CHAT_STREAM_STYLE_CONFIG
|
||||
|
||||
logger = get_module_logger("chat_stream")
|
||||
chat_stream_log_config = LogConfig(
|
||||
console_format=CHAT_STREAM_STYLE_CONFIG["console_format"],
|
||||
file_format=CHAT_STREAM_STYLE_CONFIG["file_format"],
|
||||
)
|
||||
|
||||
logger = get_module_logger("chat_stream", config=chat_stream_log_config)
|
||||
|
||||
|
||||
class ChatStream:
|
||||
|
||||
@@ -62,4 +62,6 @@ class MessageProcessor:
|
||||
mes_name = chat.group_info.group_name if chat.group_info else "私聊"
|
||||
# 将时间戳转换为datetime对象
|
||||
current_time = datetime.fromtimestamp(message.message_info.time).strftime("%H:%M:%S")
|
||||
logger.info(f"[{current_time}][{mes_name}]{chat.user_info.user_nickname}: {message.processed_plain_text}")
|
||||
logger.info(
|
||||
f"[{current_time}][{mes_name}]{message.message_info.user_info.user_nickname}: {message.processed_plain_text}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user