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.
- package/lib/index.js +12 -1
- 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.
|
|
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
|
}
|