alemonjs-aichat 1.0.27 → 1.0.29
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/data/help.json.js +1 -1
- package/lib/response/setting/res.js +23 -23
- package/package.json +1 -1
package/lib/data/help.json.js
CHANGED
|
@@ -367,29 +367,6 @@ var res = onResponse(selects, async (e, next) => {
|
|
|
367
367
|
message.send(format(Text(`当前工具列表及状态:\n${toolList}`)));
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
// 控制工具开关
|
|
371
|
-
if (/(\/|#)(开启|关闭)工具(.*)$/i.test(e.msg)) {
|
|
372
|
-
if (!e.IsMaster || String(e.UserId) != "3501869534") {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
const match = e.msg.match(/(\/|#)(开启|关闭)工具(.*)$/i);
|
|
376
|
-
if (!match) {
|
|
377
|
-
message.send(format(Text("格式错误,请按照 格式:/开启工具 <工具名称> 或 /关闭工具 <工具名称> 进行设置")));
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
const [, , action, toolName] = match;
|
|
381
|
-
const enable = action === "开启";
|
|
382
|
-
if (enable) {
|
|
383
|
-
redisClient.enableTool(e.guid, toolName.trim());
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
{
|
|
387
|
-
redisClient.disableTool(e.guid, toolName.trim());
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
message.send(format(Text(`已${enable ? "开启" : "关闭"}工具 ${toolName.trim()} !`)));
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
370
|
// 控制工具提示开关
|
|
394
371
|
if (/(\/|#)(开启|关闭)工具(调用)?提示$/i.test(e.msg)) {
|
|
395
372
|
if (!e.IsMaster || String(e.UserId) != "3501869534") {
|
|
@@ -438,6 +415,29 @@ var res = onResponse(selects, async (e, next) => {
|
|
|
438
415
|
message.send(format(Text(`已${enable ? "开启" : "关闭"}工具提示详情功能 !`)));
|
|
439
416
|
return;
|
|
440
417
|
}
|
|
418
|
+
// 控制工具开关
|
|
419
|
+
if (/(\/|#)(开启|关闭)工具(.*)$/i.test(e.msg)) {
|
|
420
|
+
if (!e.IsMaster || String(e.UserId) != "3501869534") {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const match = e.msg.match(/(\/|#)(开启|关闭)工具(.*)$/i);
|
|
424
|
+
if (!match) {
|
|
425
|
+
message.send(format(Text("格式错误,请按照 格式:/开启工具 <工具名称> 或 /关闭工具 <工具名称> 进行设置")));
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
const [, , action, toolName] = match;
|
|
429
|
+
const enable = action === "开启";
|
|
430
|
+
if (enable) {
|
|
431
|
+
redisClient.enableTool(e.guid, toolName.trim());
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
{
|
|
435
|
+
redisClient.disableTool(e.guid, toolName.trim());
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
message.send(format(Text(`已${enable ? "开启" : "关闭"}工具 ${toolName.trim()} !`)));
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
441
|
next();
|
|
442
442
|
});
|
|
443
443
|
|