优化 e.logText

This commit is contained in:
🌌 2023-09-04 17:53:24 +08:00
parent 9fc7a1dd4a
commit 388ced1288
1 changed files with 2 additions and 2 deletions

View File

@ -411,7 +411,7 @@ class PluginsLoader {
} }
} }
e.logText = `[私聊][${e.sender.nickname}(${e.user_id})]` e.logText = `[${e.sender?.nickname ? `${e.sender.nickname}(${e.user_id})` : e.user_id}]`
} }
if (e.message_type == "group" || e.notice_type == "group") { if (e.message_type == "group" || e.notice_type == "group") {
@ -436,7 +436,7 @@ class PluginsLoader {
if (!e.group_name) e.group_name = e.group?.name if (!e.group_name) e.group_name = e.group?.name
e.logText = `[${e.group_name}(${e.sender.card})]` e.logText = `[${e.group_name ? `${e.group_name}(${e.group_id})` : e.group_id}, ${e.sender?.nickname ? `${e.sender.nickname}(${e.user_id})` : e.user_id}]`
} }
if (e.user_id && cfg.master[e.self_id]?.includes(String(e.user_id))) { if (e.user_id && cfg.master[e.self_id]?.includes(String(e.user_id))) {