koishi-plugin-node-async-bot-all 2.26.1 → 2.26.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/commands.d.ts CHANGED
@@ -79,5 +79,5 @@ export declare function getNewsMsg(ctx: Context, type: number): Promise<{
79
79
  data?: Buffer;
80
80
  msg: string;
81
81
  }>;
82
- export declare function getUse(ctx: Context, session: Session, qq: string, desc: string): Promise<number>;
82
+ export declare function getUse(ctx: Context, session: Session, qq: string, desc: string | undefined): Promise<number>;
83
83
  export {};
package/lib/index.js CHANGED
@@ -266,7 +266,7 @@ async function readUserMsgFile(userName, userAvatar, msg, inversion, replyUserNa
266
266
  }
267
267
  ).replace('<at type="all"/>', "@全体成员");
268
268
  if (inversion) html = html.replace("//// ", "");
269
- if (replyUserName != void 0) html = html.replace("/**/ ", "//// ");
269
+ if (replyUserName != void 0) html = html.replace("/**/", "//// ");
270
270
  } catch (error) {
271
271
  html = error.message;
272
272
  }
@@ -934,13 +934,13 @@ __name(getNewsMsg, "getNewsMsg");
934
934
  async function getUse(ctx, session, qq, desc) {
935
935
  const log = ctx.logger("getUse");
936
936
  log.debug(`Got: {"form":"${session.platform}:${session.event.guild?.id}","user":"${session.event.user?.id}","timestamp":${session.event.timestamp},"messageId":"${session.event.message?.id}"}`);
937
- await session.send(session.text(".msg", { "at": import_koishi2.h.at(session.event.user?.id), "at2": import_koishi2.h.at(qq), "desc": import_koishi2.h.text(desc.replace('<at type="all"/>', "")) ?? "使用" }));
937
+ await session.send(session.text(".msg", { "at": import_koishi2.h.at(session.event.user?.id), "at2": import_koishi2.h.at(qq), "desc": import_koishi2.h.text(desc?.replace('<at type="all"/>', "")) ?? "使用" }));
938
938
  return 0;
939
939
  }
940
940
  __name(getUse, "getUse");
941
941
 
942
942
  // package.json
943
- var version = "2.26.1";
943
+ var version = "2.26.3";
944
944
 
945
945
  // src/index.ts
946
946
  var inject = ["database", "installer", "puppeteer", "cron"];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-node-async-bot-all",
3
3
  "description": "NodeAsync Bot插件(自用)",
4
- "version": "2.26.1",
4
+ "version": "2.26.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [
package/res/userMsg.html CHANGED
@@ -9,11 +9,10 @@
9
9
  body {
10
10
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
11
11
  background: transparent;
12
- padding: 20px; /* 给截图留一点边缘留白 */
13
- //// transform: rotate(180deg); /* 顺时针旋转180° */
12
+ padding: 20px;
13
+ //// transform: rotate(180deg);
14
14
  }
15
15
 
16
- /* 核心容器 */
17
16
  .message-card {
18
17
  display: flex;
19
18
  flex-direction: row;
@@ -22,26 +21,24 @@
22
21
  background: #ffffff;
23
22
  padding: 15px;
24
23
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
25
- border-radius: 8px; /* 给卡片加一点圆角更好看 */
24
+ border-radius: 8px;
26
25
  }
27
26
 
28
- /* 头像样式 */
29
27
  .avatar {
30
28
  width: 50px;
31
29
  height: 50px;
32
30
  border-radius: 50%;
33
31
  object-fit: cover;
34
- flex-shrink: 0; /* 防止被长文本挤压变形 */
32
+ flex-shrink: 0;
35
33
  margin-right: 15px;
36
34
  border: 1px solid #eee;
37
35
  }
38
36
 
39
- /* 消息气泡及内容容器 */
40
37
  .content {
41
38
  flex: 1;
42
39
  display: flex;
43
40
  flex-direction: column;
44
- min-width: 0; /* 防止长文本撑破flex容器 */
41
+ min-width: 0;
45
42
  }
46
43
 
47
44
  .user-name {
@@ -51,10 +48,9 @@
51
48
  margin-bottom: 6px;
52
49
  }
53
50
 
54
- /* ================= 新增:回复块样式 ================= */
55
51
  .reply-block {
56
52
  background: #f7f8fa;
57
- border-left: 3px solid #b9bbbe; /* 引用线标记 */
53
+ border-left: 3px solid #b9bbbe;
58
54
  padding: 6px 10px;
59
55
  border-radius: 0 4px 4px 0;
60
56
  margin-bottom: 8px;
@@ -71,7 +67,6 @@
71
67
  .reply-text {
72
68
  font-size: 13px;
73
69
  color: #777;
74
- /* 长文本截断:最多显示2行 */
75
70
  display: -webkit-box;
76
71
  -webkit-line-clamp: 2;
77
72
  -webkit-box-orient: vertical;
@@ -79,7 +74,6 @@
79
74
  text-overflow: ellipsis;
80
75
  word-break: break-all;
81
76
  }
82
- /* =================================================== */
83
77
 
84
78
  .text-bubble {
85
79
  font-size: 15px;
@@ -87,13 +81,13 @@
87
81
  color: #444;
88
82
  background: #f2f3f5;
89
83
  padding: 10px 14px;
90
- border-radius: 0 12px 12px 12px; /* 类似聊天气泡的圆角 */
84
+ border-radius: 0 12px 12px 12px;
91
85
 
92
- white-space: pre-wrap; /* 保留换行符 */
93
- word-wrap: break-word; /* 长单词断行 */
86
+ white-space: pre-wrap;
87
+ word-wrap: break-word;
94
88
  overflow-wrap: break-word;
95
89
  word-break: break-all;
96
- width: fit-content; /* 让气泡宽度适应内容 */
90
+ width: fit-content;
97
91
  }
98
92
  </style>
99
93
  </head>