koishi-plugin-cocoyyy-console 1.1.0-beta.9 → 1.1.1-beta.0

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 CHANGED
@@ -1538,8 +1538,7 @@ async function callOpenRouter(api_url, api_key, api_model = "gpt-4o-mini", messa
1538
1538
  logger.error("[callOpenRouter Error]: OpenRouter 请求失败", {
1539
1539
  status,
1540
1540
  detail,
1541
- url: err.config?.url,
1542
- payload: err.config?.data
1541
+ url: err.config?.url
1543
1542
  });
1544
1543
  const errorMessage = `test error${status ? `(${status})` : ""}: ${detail}`;
1545
1544
  return { err: errorMessage, resp: null };
@@ -1626,7 +1625,6 @@ son判断模式列表:
1626
1625
  if (!dev_mode) {
1627
1626
  if (!is_at_bot_quote(session)) return "请提供正确格式,如: [引用消息] @bot son [判断模式]";
1628
1627
  } else {
1629
- if (!session.quote) return "请引用消息后使用功能";
1630
1628
  }
1631
1629
  if (think_flag) return "请等待思考结果";
1632
1630
  const parttern = args?.[0];
@@ -2083,7 +2081,7 @@ var is_gaming = false;
2083
2081
  var chatPrompt = [];
2084
2082
  var chatHistory2 = [];
2085
2083
  var gameTimeout = null;
2086
- var GAME_TIMEOUT_MINUTES = local_config2?.game?.timeout_minutes || 10;
2084
+ var GAME_TIMEOUT_MINUTES = -1;
2087
2085
  async function startSituationPuzzle(config) {
2088
2086
  chatPrompt = [];
2089
2087
  chatHistory2 = [];
@@ -2097,6 +2095,9 @@ async function startSituationPuzzle(config) {
2097
2095
  }
2098
2096
  chatPrompt.push({ role: "assistant", content: [{ type: "text", text: resp }] });
2099
2097
  is_gaming = true;
2098
+ if (GAME_TIMEOUT_MINUTES <= 0) {
2099
+ GAME_TIMEOUT_MINUTES = local_config2?.game?.timeout_minutes || 10;
2100
+ }
2100
2101
  clearGameTimeout();
2101
2102
  gameTimeout = setTimeout(async () => {
2102
2103
  logger.info(`[SituationPuzzle Timeout]: 游戏已超时(${GAME_TIMEOUT_MINUTES}分钟),自动结束游戏`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-cocoyyy-console",
3
3
  "description": "自用koishi插件,功能包含复读,记录黑历史,*人等",
4
- "version": "1.1.0-beta.9",
4
+ "version": "1.1.1-beta.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [
package/readme.md CHANGED
@@ -14,4 +14,8 @@
14
14
 
15
15
  ### 标签
16
16
 
17
- 通过指令添加标签,标签和黑历史图片信息存放在数据库,具体需要设置内配置。在使用获取命令时可以从已有黑历史随机抽取并返回。
17
+ 通过指令添加标签,标签和黑历史图片信息存放在数据库,具体需要设置内配置。在使用获取命令时可以从已有黑历史随机抽取并输出。
18
+
19
+ ### *人
20
+
21
+ 每个群可以设置3个用户,每次有人@用户时,会从添加的语句中随机一条输出。