koishi-plugin-bcjh-logs 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +7 -6
- package/package.json +1 -1
- package/readme.md +1 -1
package/lib/index.js
CHANGED
|
@@ -47,13 +47,14 @@ function apply(ctx) {
|
|
|
47
47
|
}
|
|
48
48
|
const stripped = session.stripped;
|
|
49
49
|
const content = stripped?.content || session.content || "";
|
|
50
|
-
const userId = session.userId || "
|
|
51
|
-
const channelId = session.channelId || "
|
|
52
|
-
const guildId = session.guildId || "
|
|
53
|
-
const platform = session.platform || "
|
|
54
|
-
const
|
|
50
|
+
const userId = session.userId || "-";
|
|
51
|
+
const channelId = session.channelId || "-";
|
|
52
|
+
const guildId = session.guildId || "-";
|
|
53
|
+
const platform = session.platform || "-";
|
|
54
|
+
const green = "\x1B[32m";
|
|
55
|
+
const yellow = "\x1B[33m";
|
|
55
56
|
const reset = "\x1B[0m";
|
|
56
|
-
const logMessage = `{atSelf:${
|
|
57
|
+
const logMessage = `{atSelf:${yellow}${atSelf}${reset},content:‘${green}${content}${reset}’,用户ID:${userId},频道ID:${channelId},群组ID:${guildId},平台:${platform}}`;
|
|
57
58
|
logger.info(logMessage);
|
|
58
59
|
return next();
|
|
59
60
|
}, true);
|
package/package.json
CHANGED
package/readme.md
CHANGED