koishi-plugin-echo-cave 1.18.4 → 1.18.5
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/adapters/onebot/user.d.ts +1 -1
- package/lib/index.cjs +3 -4
- package/package.json +1 -1
|
@@ -2,6 +2,6 @@ import { Context, Session } from 'koishi';
|
|
|
2
2
|
export declare function getUserIdFromNickname(session: Session, nickname: string, userId: number): Promise<number>;
|
|
3
3
|
export declare function getUserName(ctx: Context, session: Session, userId: string): Promise<string>;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Check if users belong to the specified group
|
|
6
6
|
*/
|
|
7
7
|
export declare function checkUsersInGroup(ctx: Context, session: Session, userIds: string[]): Promise<boolean>;
|
package/lib/index.cjs
CHANGED
|
@@ -156,7 +156,7 @@ var require_zh_CN2 = __commonJS({
|
|
|
156
156
|
messages: {
|
|
157
157
|
noMsgContributed: '\u{1F680} \u60A8\u5728\u56DE\u58F0\u6D1E\u4E2D\u6682\u65E0\u6295\u7A3F\uFF0C\u5FEB\u4F7F\u7528 "cave.echo" \u547D\u4EE4\u6DFB\u52A0\u7B2C\u4E00\u6761\u6D88\u606F\u5427\uFF01',
|
|
158
158
|
msgListHeader: "\u{1F4DC} \u60A8\u5728\u672C\u9891\u9053\u6295\u7A3F\u7684\u56DE\u58F0\u6D1E\u6D88\u606F\u5217\u8868\uFF1A",
|
|
159
|
-
msgListItem: "ID: {0} | \u521B\u5EFA\u65F6\u95F4
|
|
159
|
+
msgListItem: "ID: {0} | \u521B\u5EFA\u65F6\u95F4\uFF1A{1}"
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
"cave.trace": {
|
|
@@ -164,7 +164,7 @@ var require_zh_CN2 = __commonJS({
|
|
|
164
164
|
messages: {
|
|
165
165
|
noMsgTraced: '\u{1F680} \u60A8\u5728\u56DE\u58F0\u6D1E\u4E2D\u6682\u65E0\u53D1\u8A00\u88AB\u6295\u7A3F\uFF0C\u5FEB\u4F7F\u7528 "cave.echo" \u547D\u4EE4\u6DFB\u52A0\u7B2C\u4E00\u6761\u6D88\u606F\u5427\uFF01',
|
|
166
166
|
msgListHeader: "\u{1F4DC} \u60A8\u5728\u672C\u9891\u9053\u53D1\u8A00\u7684\u56DE\u58F0\u6D1E\u6D88\u606F\u5217\u8868\uFF1A",
|
|
167
|
-
msgListItem: "ID: {0} | \u521B\u5EFA\u65F6\u95F4
|
|
167
|
+
msgListItem: "ID: {0} | \u521B\u5EFA\u65F6\u95F4\uFF1A{1}"
|
|
168
168
|
}
|
|
169
169
|
},
|
|
170
170
|
"cave.bind": {
|
|
@@ -365,7 +365,7 @@ async function checkAndCleanMediaFiles(ctx, cfg, type) {
|
|
|
365
365
|
switch (type) {
|
|
366
366
|
case "image":
|
|
367
367
|
return (cfg.maxImageSize || 100) * 1024 * 1024;
|
|
368
|
-
//
|
|
368
|
+
// Convert to bytes
|
|
369
369
|
case "video":
|
|
370
370
|
return (cfg.maxVideoSize || 500) * 1024 * 1024;
|
|
371
371
|
case "file":
|
|
@@ -505,7 +505,6 @@ async function addCave(ctx, session, cfg, userIds) {
|
|
|
505
505
|
const messageId = quote.id;
|
|
506
506
|
let parsedUserIds = [];
|
|
507
507
|
if (userIds && userIds.length > 0) {
|
|
508
|
-
ctx.logger.info(`Original userIds in addCave: ${JSON.stringify(userIds)}`);
|
|
509
508
|
const result = parseUserIds(userIds);
|
|
510
509
|
if (result.error === "invalid_all_mention") {
|
|
511
510
|
return session.text("echo-cave.user.invalidAllMention");
|