This commit is contained in:
2026-01-02 18:48:35 +08:00
parent 580b8af1dc
commit 617823da11
2 changed files with 8 additions and 0 deletions

View File

@@ -146,6 +146,13 @@ class CommandManager:
bot: Bot 实例。
event: 已解析的事件对象。
"""
# --- 全局过滤机器人自身消息 ---
# 仅对消息事件生效
if event.post_type == 'message' and global_config.bot.get('ignore_self_message', False):
if hasattr(event, 'user_id') and hasattr(event, 'self_id') and event.user_id == event.self_id:
return
post_type = event.post_type
if post_type == 'message':