koishi-plugin-ai-puzzle 0.0.21 → 0.0.22

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.
Files changed (2) hide show
  1. package/lib/index.js +12 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ var require_package = __commonJS({
36
36
  module2.exports = {
37
37
  name: "koishi-plugin-ai-puzzle",
38
38
  description: "使用AI生成猜谜谜题,支持多模式游戏、模糊匹配、图片渲染",
39
- version: "0.0.21",
39
+ version: "0.0.22",
40
40
  main: "lib/index.js",
41
41
  typings: "lib/index.d.ts",
42
42
  files: [
@@ -1825,11 +1825,22 @@ var GameOrchestrator = class {
1825
1825
  clearTimeout(pvp.autoTimer);
1826
1826
  pvp.autoTimer = null;
1827
1827
  }
1828
+ const currentPuzzle = pvp.puzzles[pvp.currentPuzzleIndex];
1829
+ if (currentPuzzle) {
1830
+ const detail = this.buildFullTextResult(currentPuzzle.puzzle, currentPuzzle.puzzle.clues.length - 1);
1831
+ const sendBot = Object.values(this.ctx.bots)[0];
1832
+ if (sendBot) await sendBot.sendMessage(channelId, detail).catch(() => {
1833
+ });
1834
+ }
1828
1835
  pvp.currentPuzzleIndex++;
1829
1836
  pvp.currentClueIndex = 0;
1830
1837
  if (pvp.currentPuzzleIndex >= pvp.puzzleCount) {
1831
1838
  await this.pvpEnd(channelId);
1832
1839
  } else {
1840
+ const sendBot = Object.values(this.ctx.bots)[0];
1841
+ if (sendBot) await sendBot.sendMessage(channelId, "5秒后开始下一题...").catch(() => {
1842
+ });
1843
+ await new Promise((resolve) => setTimeout(resolve, 5e3));
1833
1844
  await this.pvpThrowClue(channelId);
1834
1845
  }
1835
1846
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ai-puzzle",
3
3
  "description": "使用AI生成猜谜谜题,支持多模式游戏、模糊匹配、图片渲染",
4
- "version": "0.0.21",
4
+ "version": "0.0.22",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [