koishi-plugin-wordle-game 2.5.5 → 2.5.7
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.d.ts +2 -0
- package/lib/index.js +63 -45
- package/package.json +4 -4
- package/readme.md +20 -21
package/lib/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface Config {
|
|
|
18
18
|
allowNonPlayersToGuess: boolean;
|
|
19
19
|
enableWordGuessMiddleware: boolean;
|
|
20
20
|
shouldPromptWordLengthInput: boolean;
|
|
21
|
+
isPreventUserDuplicateGuessInput: boolean;
|
|
21
22
|
shouldPromptForWordLengthOnNonClassicStart: boolean;
|
|
22
23
|
enableWordGuessTimeLimit: boolean;
|
|
23
24
|
wordGuessTimeLimitInSeconds: number;
|
|
@@ -83,6 +84,7 @@ export interface GameRecord {
|
|
|
83
84
|
isFreeMode: boolean;
|
|
84
85
|
previousGuess: string[];
|
|
85
86
|
previousGuessIdioms: string[];
|
|
87
|
+
guessHistory: string[];
|
|
86
88
|
}
|
|
87
89
|
export interface ExtraGameRecord {
|
|
88
90
|
id: number;
|
package/lib/index.js
CHANGED
|
@@ -1422,19 +1422,20 @@ var Config = import_koishi.Schema.intersect([
|
|
|
1422
1422
|
// shouldAddBorderInHandleMode: Schema.boolean().default(true).description(`是否为块添加边框,仅在汉兜模式下生效。`),
|
|
1423
1423
|
}).description("主题设置"),
|
|
1424
1424
|
import_koishi.Schema.object({
|
|
1425
|
-
|
|
1426
|
-
|
|
1425
|
+
compositeImagePageWidth: import_koishi.Schema.number().min(1).default(800).description(`合成图片页面宽度。`),
|
|
1426
|
+
compositeImagePageHeight: import_koishi.Schema.number().min(1).default(100).description(`合成图片页面高度。`),
|
|
1427
|
+
maxSimultaneousGuesses: import_koishi.Schema.number().min(1).default(4).description(`最多同时猜测单词的数量。`),
|
|
1427
1428
|
maxInvestmentCurrency: import_koishi.Schema.number().min(0).default(50).description(`加入游戏时可投入的最大货币数额。`),
|
|
1429
|
+
defaultMaxLeaderboardEntries: import_koishi.Schema.number().min(0).default(10).description(`显示排行榜时默认的最大人数。`),
|
|
1428
1430
|
defaultRewardMultiplier: import_koishi.Schema.number().min(0).default(2).description(`猜单词经典模式赢了之后奖励的货币倍率。`),
|
|
1429
|
-
|
|
1430
|
-
compositeImagePageWidth: import_koishi.Schema.number().min(1).default(800).description(`合成图片页面宽度。`),
|
|
1431
|
-
compositeImagePageHeight: import_koishi.Schema.number().min(1).default(100).description(`合成图片页面高度。`)
|
|
1431
|
+
defaultWordLengthForGuessing: import_koishi.Schema.number().min(1).default(5).description(`非经典游戏模式下,默认的猜单词长度。`)
|
|
1432
1432
|
}).description("游戏设置"),
|
|
1433
1433
|
import_koishi.Schema.intersect([
|
|
1434
1434
|
import_koishi.Schema.object({
|
|
1435
|
-
allowNonPlayersToGuess: import_koishi.Schema.boolean().default(true).description(`是否允许未加入游戏的玩家进行猜单词的操作,开启后可以无需加入直接开始。`),
|
|
1436
1435
|
enableWordGuessMiddleware: import_koishi.Schema.boolean().default(true).description(`是否开启猜单词指令无前缀的中间件。`),
|
|
1436
|
+
isPreventUserDuplicateGuessInput: import_koishi.Schema.boolean().default(true).description(`是否阻止用户重复输入相同的猜测词。`),
|
|
1437
1437
|
shouldPromptWordLengthInput: import_koishi.Schema.boolean().default(true).description(`是否在开始游戏引导中提示输入猜单词的长度,不开启则为默认长度。`),
|
|
1438
|
+
allowNonPlayersToGuess: import_koishi.Schema.boolean().default(true).description(`是否允许未加入游戏的玩家进行猜单词的操作,开启后可以无需加入直接开始。`),
|
|
1438
1439
|
shouldPromptForWordLengthOnNonClassicStart: import_koishi.Schema.boolean().default(true).description(`是否在开始非经典模式时提示输入猜单词的长度,不开启则为默认长度。`)
|
|
1439
1440
|
}).description("游戏行为设置"),
|
|
1440
1441
|
import_koishi.Schema.object({
|
|
@@ -1552,42 +1553,43 @@ async function apply(ctx, config) {
|
|
|
1552
1553
|
const introductionImgBuffer = fs.readFileSync(introductionFilePath);
|
|
1553
1554
|
ctx.model.extend("wordle_game_records", {
|
|
1554
1555
|
id: "unsigned",
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
remainingGuessesCount: "integer",
|
|
1558
|
-
strokesHtmlCache: { type: "json", initial: [[], [], [], []] },
|
|
1559
|
-
wordAnswerChineseDefinition: "string",
|
|
1556
|
+
isWin: "boolean",
|
|
1557
|
+
pinyin: "string",
|
|
1560
1558
|
wordGuess: "string",
|
|
1561
|
-
|
|
1562
|
-
guessWordLength: "unsigned",
|
|
1559
|
+
channelId: "string",
|
|
1563
1560
|
gameMode: "string",
|
|
1564
|
-
isRunning: "boolean",
|
|
1565
1561
|
timestamp: "string",
|
|
1566
|
-
|
|
1567
|
-
presentLetters: "string",
|
|
1568
|
-
absentLetters: "string",
|
|
1569
|
-
isHardMode: "boolean",
|
|
1570
|
-
remainingWordsList: "list",
|
|
1562
|
+
absentTones: "list",
|
|
1571
1563
|
isAbsurd: "boolean",
|
|
1572
|
-
|
|
1564
|
+
isStarted: "boolean",
|
|
1573
1565
|
targetWord: "string",
|
|
1566
|
+
presentTones: "list",
|
|
1567
|
+
guessHistory: "list",
|
|
1568
|
+
isRunning: "boolean",
|
|
1569
|
+
correctLetters: "list",
|
|
1570
|
+
isHardMode: "boolean",
|
|
1571
|
+
previousGuess: "list",
|
|
1572
|
+
absentPinyins: "list",
|
|
1573
|
+
isFreeMode: "boolean",
|
|
1574
1574
|
wordlesNum: "unsigned",
|
|
1575
|
+
presentPinyins: "list",
|
|
1576
|
+
absentLetters: "string",
|
|
1575
1577
|
wordleIndex: "unsigned",
|
|
1576
|
-
|
|
1578
|
+
presentLetters: "string",
|
|
1579
|
+
wordGuessHtmlCache: "text",
|
|
1580
|
+
remainingWordsList: "list",
|
|
1581
|
+
isChallengeMode: "boolean",
|
|
1577
1582
|
isUltraHardMode: "boolean",
|
|
1578
|
-
|
|
1579
|
-
|
|
1583
|
+
guessWordLength: "unsigned",
|
|
1584
|
+
previousGuessIdioms: "list",
|
|
1580
1585
|
presentTonesWithIndex: "list",
|
|
1581
|
-
absentPinyins: "list",
|
|
1582
|
-
absentTones: "list",
|
|
1583
|
-
presentPinyinsWithIndex: "list",
|
|
1584
1586
|
correctTonesWithIndex: "list",
|
|
1587
|
+
presentPinyinsWithIndex: "list",
|
|
1588
|
+
presentLettersWithIndex: "list",
|
|
1585
1589
|
correctPinyinsWithIndex: "list",
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
previousGuess: "list",
|
|
1590
|
-
previousGuessIdioms: "list"
|
|
1590
|
+
remainingGuessesCount: "integer",
|
|
1591
|
+
wordAnswerChineseDefinition: "string",
|
|
1592
|
+
strokesHtmlCache: { type: "json", initial: [[], [], [], []] }
|
|
1591
1593
|
}, {
|
|
1592
1594
|
primary: "id",
|
|
1593
1595
|
autoInc: true
|
|
@@ -1856,14 +1858,15 @@ ${import_koishi.h.image(imageBuffer, `image/${config.imageType}`)}`, `猜测`);
|
|
|
1856
1858
|
await updatePlayerRecordsLose(channelId, gameInfo);
|
|
1857
1859
|
const processedResult = gameInfo.wordlesNum > 1 ? `
|
|
1858
1860
|
${await processExtraGameRecords(channelId)}` : "";
|
|
1859
|
-
await endGame(channelId);
|
|
1860
1861
|
const duration = calculateGameDuration(Number(gameInfo.timestamp), timestamp);
|
|
1861
1862
|
const message = `【@${username}】
|
|
1862
1863
|
由于您执行了操作:【结束】
|
|
1863
1864
|
游戏已结束!
|
|
1864
1865
|
${duration}${gameInfo.isAbsurd ? "" : `
|
|
1865
1866
|
${generateGameEndMessage(gameInfo)}`}${processedResult}`;
|
|
1866
|
-
|
|
1867
|
+
await sendMessage(session, message, `改名 玩法介绍 排行榜 查询玩家记录 开始游戏 再来一把${gameInfo.gameMode}`, 2);
|
|
1868
|
+
await endGame(channelId);
|
|
1869
|
+
return;
|
|
1867
1870
|
});
|
|
1868
1871
|
ctx.command("wordleGame.开始 [guessWordLength:number]", "开始游戏引导").option("hard", "--hard 困难模式", { fallback: false }).option("ultraHardMode", "--uhard 超困难模式", { fallback: false }).option("absurd", "--absurd 变态模式", { fallback: false }).option("challenge", "--challenge 变态挑战模式", { fallback: false }).option("wordles", "--wordles <value:number> 同时猜测多个单词", { fallback: 1 }).action(async ({ session, options }, guessWordLength) => {
|
|
1869
1872
|
let { channelId, userId, username } = session;
|
|
@@ -2418,11 +2421,12 @@ ${image}`, `结束游戏 猜测`);
|
|
|
2418
2421
|
if (config.enableWordGuessTimeLimit) {
|
|
2419
2422
|
if (timeDifferenceInSeconds > config.wordGuessTimeLimitInSeconds) {
|
|
2420
2423
|
await updatePlayerRecordsLose(channelId, gameInfo);
|
|
2421
|
-
await
|
|
2422
|
-
return await sendMessage(session, `【@${username}】
|
|
2424
|
+
await sendMessage(session, `【@${username}】
|
|
2423
2425
|
作答时间超过【${config.wordGuessTimeLimitInSeconds}】秒!
|
|
2424
2426
|
很遗憾,你们输了!
|
|
2425
2427
|
下次猜快点吧~`, `改名 排行榜 查询玩家记录 开始游戏 再来一把${gameInfo.gameMode}`, 2);
|
|
2428
|
+
await endGame(channelId);
|
|
2429
|
+
return;
|
|
2426
2430
|
}
|
|
2427
2431
|
}
|
|
2428
2432
|
const isInGame = await isPlayerInGame(channelId, userId);
|
|
@@ -2451,6 +2455,11 @@ ${image}`, `结束游戏 猜测`);
|
|
|
2451
2455
|
presentLettersWithIndex,
|
|
2452
2456
|
isFreeMode
|
|
2453
2457
|
} = gameInfo;
|
|
2458
|
+
if (gameInfo.guessHistory && gameInfo.guessHistory.includes(inputWord.toLowerCase())) {
|
|
2459
|
+
await setGuessRunningStatus(channelId, false);
|
|
2460
|
+
return await sendMessage(session, `【@${username}】
|
|
2461
|
+
这个已经猜过了哦!`, `猜测`);
|
|
2462
|
+
}
|
|
2454
2463
|
if (!/^[a-zA-Z]+$/.test(inputWord) && gameMode !== "汉兜" && gameMode !== "词影" && gameMode !== "Numberle" && gameMode !== "Math") {
|
|
2455
2464
|
await setGuessRunningStatus(channelId, false);
|
|
2456
2465
|
return await sendMessage(session, `【@${username}】
|
|
@@ -2548,6 +2557,9 @@ ${progressMessage}`, `猜测`);
|
|
|
2548
2557
|
}
|
|
2549
2558
|
}
|
|
2550
2559
|
}
|
|
2560
|
+
await ctx.database.set("wordle_game_records", { channelId }, {
|
|
2561
|
+
guessHistory: gameInfo.guessHistory ? [...gameInfo.guessHistory, lowercaseInputWord] : [lowercaseInputWord]
|
|
2562
|
+
});
|
|
2551
2563
|
const foundIdiom = findIdiomByIdiom(inputWord, idiomsList);
|
|
2552
2564
|
if (!userInputPinyin && foundIdiom) {
|
|
2553
2565
|
userInputPinyin = foundIdiom.pinyin;
|
|
@@ -2619,11 +2631,12 @@ ${progressMessage}`, `猜测`);
|
|
|
2619
2631
|
}
|
|
2620
2632
|
if (longestRemainingWordList.length === 0) {
|
|
2621
2633
|
await updatePlayerRecordsLose(channelId, gameInfo);
|
|
2622
|
-
await
|
|
2623
|
-
return await sendMessage(session, `【@${username}】
|
|
2634
|
+
await sendMessage(session, `【@${username}】
|
|
2624
2635
|
根据透露出的信息!
|
|
2625
2636
|
已经无任何可用单词!
|
|
2626
2637
|
很遗憾,你们输了!`, `改名 排行榜 查询玩家记录 开始游戏 再来一把${gameInfo.gameMode}`, 2);
|
|
2638
|
+
await endGame(channelId);
|
|
2639
|
+
return;
|
|
2627
2640
|
}
|
|
2628
2641
|
let randomWord = longestRemainingWordList[Math.floor(Math.random() * longestRemainingWordList.length)];
|
|
2629
2642
|
const foundWord = findWord(randomWord);
|
|
@@ -2803,7 +2816,6 @@ ${emptyGridHtml}`);
|
|
|
2803
2816
|
await ctx.database.set("wordle_player_records", { userId }, updateData);
|
|
2804
2817
|
const processedResult = wordlesNum > 1 ? `
|
|
2805
2818
|
${await processExtraGameRecords(channelId)}` : "";
|
|
2806
|
-
await endGame(channelId);
|
|
2807
2819
|
const gameDuration = calculateGameDuration(Number(gameInfo.timestamp), timestamp);
|
|
2808
2820
|
const imageType = config.imageType;
|
|
2809
2821
|
const settlementResult = finalSettlementString === "" ? "" : `最终结算结果如下:
|
|
@@ -2818,21 +2830,24 @@ ${settlementResult}
|
|
|
2818
2830
|
`;
|
|
2819
2831
|
if (!config.isTextToImageConversionEnabled && isQQOfficialRobotMarkdownTemplateEnabled && session.platform === "qq") {
|
|
2820
2832
|
await sendMessage(session, import_koishi.h.image(imageBuffer, `image/${imageType}`), ``);
|
|
2821
|
-
|
|
2833
|
+
await sendMessage(session, `
|
|
2822
2834
|
【@${username}】
|
|
2823
2835
|
太棒了,你猜出来了!
|
|
2824
2836
|
${gameDuration}
|
|
2825
2837
|
${generateGameEndMessage(gameInfo)}${processedResult}
|
|
2826
2838
|
${settlementResult}
|
|
2827
2839
|
`, `改名 排行榜 查询玩家记录 开始游戏 再来一把${gameInfo.gameMode}`, 2);
|
|
2840
|
+
await endGame(channelId);
|
|
2841
|
+
return;
|
|
2828
2842
|
}
|
|
2829
|
-
|
|
2843
|
+
await sendMessage(session, message, `改名 排行榜 查询玩家记录 开始游戏 再来一把${gameInfo.gameMode}`, 2);
|
|
2844
|
+
await endGame(channelId);
|
|
2845
|
+
return;
|
|
2830
2846
|
}
|
|
2831
2847
|
if (isLose) {
|
|
2832
2848
|
await updatePlayerRecordsLose(channelId, gameInfo);
|
|
2833
2849
|
const processedResult = wordlesNum > 1 ? `
|
|
2834
2850
|
${await processExtraGameRecords(channelId)}` : "";
|
|
2835
|
-
await endGame(channelId);
|
|
2836
2851
|
const challengeMessage = isChallengeMode ? `
|
|
2837
2852
|
目标单词为:【${targetWord}】
|
|
2838
2853
|
它不再是可能的秘密单词!` : "";
|
|
@@ -2845,11 +2860,15 @@ ${import_koishi.h.image(imageBuffer, `image/${config.imageType}`)}
|
|
|
2845
2860
|
${gameDuration}${answerInfo}${processedResult}`;
|
|
2846
2861
|
if (!config.isTextToImageConversionEnabled && isQQOfficialRobotMarkdownTemplateEnabled && session.platform === "qq") {
|
|
2847
2862
|
await sendMessage(session, import_koishi.h.image(imageBuffer, `image/${config.imageType}`), ``);
|
|
2848
|
-
|
|
2863
|
+
await sendMessage(session, `很遗憾,你们没有猜出来!${challengeMessage}
|
|
2849
2864
|
但没关系~下次加油哇!
|
|
2850
2865
|
${gameDuration}${answerInfo}${processedResult}`, `改名 排行榜 查询玩家记录 开始游戏 再来一把${gameInfo.gameMode}`, 2);
|
|
2866
|
+
await endGame(channelId);
|
|
2867
|
+
return;
|
|
2851
2868
|
}
|
|
2852
|
-
|
|
2869
|
+
await sendMessage(session, message, `改名 排行榜 查询玩家记录 开始游戏 再来一把`, 2);
|
|
2870
|
+
await endGame(channelId);
|
|
2871
|
+
return;
|
|
2853
2872
|
}
|
|
2854
2873
|
await setGuessRunningStatus(channelId, false);
|
|
2855
2874
|
await sendMessage(session, import_koishi.h.image(imageBuffer, `image/${config.imageType}`), `结束游戏 ${gameInfo.gameMode === "汉兜" ? `拼音速查表 ` : ``}查询进度 猜测`, 2);
|
|
@@ -4377,8 +4396,7 @@ ${leaderboard}`;
|
|
|
4377
4396
|
await Promise.all([
|
|
4378
4397
|
ctx.database.remove("wordle_gaming_player_records", { channelId }),
|
|
4379
4398
|
ctx.database.remove("wordle_game_records", { channelId }),
|
|
4380
|
-
ctx.database.remove("extra_wordle_game_records", { channelId })
|
|
4381
|
-
await setGuessRunningStatus(channelId, false)
|
|
4399
|
+
ctx.database.remove("extra_wordle_game_records", { channelId })
|
|
4382
4400
|
]);
|
|
4383
4401
|
}
|
|
4384
4402
|
__name(endGame, "endGame");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-wordle-game",
|
|
3
3
|
"description": "欢迎来到 [Wordle](https://www.nytimes.com/games/wordle/index.html) | [汉兜](https://handle.antfu.me/) | [词影](https://cy.surprising.studio/) |... 猜单词|猜成语|猜数字|猜数学方程式|... 的小游戏,支持QQ官方MD模板,且包含多种词库、主题、游戏设置和排行榜系统等。",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.7",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"猜"
|
|
62
62
|
],
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"koishi": "^4.17.
|
|
64
|
+
"koishi": "^4.17.11"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"koishi-plugin-markdown-to-image-service": "^1.1
|
|
67
|
+
"koishi-plugin-markdown-to-image-service": "^1.2.1",
|
|
68
68
|
"koishi-plugin-monetary": "^0.1.3",
|
|
69
69
|
"koishi-plugin-puppeteer": "^3.8.4"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"cheerio": "^1.0.0
|
|
72
|
+
"cheerio": "^1.0.0"
|
|
73
73
|
}
|
|
74
74
|
}
|
package/readme.md
CHANGED
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
|
|
46
46
|
主要功能:
|
|
47
47
|
|
|
48
|
-
-
|
|
48
|
+
- **可自定义游戏设置**:支持自定义猜词长度等设置。
|
|
49
49
|
|
|
50
|
-
-
|
|
50
|
+
- **排行榜系统**:支持查询不同模式下的总胜负场次。
|
|
51
51
|
|
|
52
|
-
-
|
|
52
|
+
- **多种游戏模式**:支持经典、汉兜、词影、方程式等多种游戏模式。
|
|
53
53
|
|
|
54
54
|
- **经典模式**:随机从经典的 Wordle 英文单词中抽选,投入金币获得奖励。
|
|
55
55
|
|
|
@@ -76,8 +76,7 @@ npm install koishi-plugin-wordle-game
|
|
|
76
76
|
- 如果使用过程中出现成语的未知错误,可以前往 `data/wordleGame/idioms.json` 文件中搜索该成语,查看是否存在拼音的错误。
|
|
77
77
|
- 当然你也可以直接删除这个 `idioms.json`
|
|
78
78
|
文件,然后重新启动机器人,这样会重新生成一个可能已经修复问题的新的 `idioms.json` 文件。
|
|
79
|
-
- 这个文件里可以添加自定义的成语 0.0,例如:如果你想加 “原神启动” 也是可以的,注意格式即可(提醒:最后一个元素后面不要加逗号,因为不符合
|
|
80
|
-
JSON 格式)。
|
|
79
|
+
- 这个文件里可以添加自定义的成语 0.0,例如:如果你想加 “原神启动” 也是可以的,注意格式即可(提醒:最后一个元素后面不要加逗号,因为不符合 JSON 格式)。
|
|
81
80
|
- 遇到解决不了的问题,也可以想办法联系我,我很乐意帮助你!希望你玩的开心~😊
|
|
82
81
|
|
|
83
82
|
## 🎛 配置
|
|
@@ -92,13 +91,13 @@ npm install koishi-plugin-wordle-game
|
|
|
92
91
|
### 游戏设置
|
|
93
92
|
|
|
94
93
|
- `defaultMaxLeaderboardEntries: number`
|
|
95
|
-
- 显示排行榜时默认的最大人数。默认值为 `10
|
|
94
|
+
- 显示排行榜时默认的最大人数。默认值为 `10`。
|
|
96
95
|
- `defaultWordLengthForGuessing: number`
|
|
97
|
-
- 非经典游戏模式下,默认的猜单词长度。默认值为 `5
|
|
96
|
+
- 非经典游戏模式下,默认的猜单词长度。默认值为 `5`。
|
|
98
97
|
- `maxInvestmentCurrency: number`
|
|
99
|
-
- 加入游戏时可投入的最大货币数额。默认值为 `50
|
|
98
|
+
- 加入游戏时可投入的最大货币数额。默认值为 `50`。
|
|
100
99
|
- `defaultRewardMultiplier: number`
|
|
101
|
-
- 猜单词经典模式赢了之后奖励的货币倍率。默认值为 `2
|
|
100
|
+
- 猜单词经典模式赢了之后奖励的货币倍率。默认值为 `2`。
|
|
102
101
|
- `maxSimultaneousGuesses: number`
|
|
103
102
|
- 最多同时猜测单词的数量,默认值为 `4`。
|
|
104
103
|
- `compositeImagePageWidth: number`
|
|
@@ -109,22 +108,24 @@ npm install koishi-plugin-wordle-game
|
|
|
109
108
|
### 游戏行为设置
|
|
110
109
|
|
|
111
110
|
- `allowNonPlayersToGuess: boolean`
|
|
112
|
-
- 是否允许未加入游戏的玩家进行猜单词的操作,开启后可以无需加入直接开始。默认值为 `true
|
|
111
|
+
- 是否允许未加入游戏的玩家进行猜单词的操作,开启后可以无需加入直接开始。默认值为 `true`。
|
|
112
|
+
- `isPreventUserDuplicateGuessInput: boolean`
|
|
113
|
+
- 是否阻止玩家重复猜测相同的单词。默认值为 `true`。
|
|
113
114
|
- `enableWordGuessMiddleware: boolean`
|
|
114
|
-
- 是否开启猜单词指令无前缀的中间件。默认值为 `true
|
|
115
|
+
- 是否开启猜单词指令无前缀的中间件。默认值为 `true`。
|
|
115
116
|
- `shouldPromptWordLengthInput: boolean`
|
|
116
|
-
- 是否在开始游戏引导中提示输入猜单词的长度,不开启则为默认长度。默认值为 `true
|
|
117
|
+
- 是否在开始游戏引导中提示输入猜单词的长度,不开启则为默认长度。默认值为 `true`。
|
|
117
118
|
- `shouldPromptForWordLengthOnNonClassicStart: boolean`
|
|
118
|
-
- 是否在开始非经典模式时提示输入猜单词的长度,不开启则为默认长度。默认值为 `true
|
|
119
|
+
- 是否在开始非经典模式时提示输入猜单词的长度,不开启则为默认长度。默认值为 `true`。
|
|
119
120
|
- `enableWordGuessTimeLimit: boolean`
|
|
120
|
-
- 是否开启猜单词游戏作答时间限制功能。默认值为 `false
|
|
121
|
+
- 是否开启猜单词游戏作答时间限制功能。默认值为 `false`。
|
|
121
122
|
- `wordGuessTimeLimitInSeconds: number`
|
|
122
|
-
- 猜单词游戏作答时间,单位是秒。默认值为 `120
|
|
123
|
+
- 猜单词游戏作答时间,单位是秒。默认值为 `120`。
|
|
123
124
|
- `retractDelay`:自动撤回等待的时间,默认值为 0,单位是秒。值为 0 时不启用自动撤回功能。
|
|
124
125
|
- `imageType: "png" | "jpeg" | "webp"`
|
|
125
|
-
- 发送的图片类型。默认值为 `"png"
|
|
126
|
+
- 发送的图片类型。默认值为 `"png"`。
|
|
126
127
|
- `isTextToImageConversionEnabled: boolean`
|
|
127
|
-
- 是否开启将文本转为图片的功能(可选),如需启用,需要启用 `markdownToImage` 服务。默认值为 `false
|
|
128
|
+
- 是否开启将文本转为图片的功能(可选),如需启用,需要启用 `markdownToImage` 服务。默认值为 `false`。
|
|
128
129
|
- `isEnableQQOfficialRobotMarkdownTemplate: boolean`
|
|
129
130
|
- 是否启用 QQ 官方机器人的 Markdown 模板,带消息按钮。
|
|
130
131
|
- `customTemplateId: string`
|
|
@@ -194,8 +195,7 @@ npm install koishi-plugin-wordle-game
|
|
|
194
195
|
- `wordleGame.查询玩家记录 [targetUser:text]` - 查询玩家记录,可选参数为目标玩家的 at 信息。
|
|
195
196
|
- `wordleGame.查成语.百度汉语 [targetWord:text]` - 在 [百度汉语](https://hanyu.baidu.com/) 中查询成语信息(内地)。
|
|
196
197
|
- `wordleGame.查单词.WordWord [targetWord:text]` - 在 [WordWord](https://wordword.org/) 中查询单词信息(英文定义)。
|
|
197
|
-
- `wordleGame.排行榜.损益/总.胜场/总.输场/经典/CET4/CET6/GMAT/GRE/IELTS/SAT/TOEFL/考研/专八/专四/ALL/Lewdle/汉兜/Numberle/Math.胜场/输场/最快用时 [number:number]` -
|
|
198
|
-
查看不同模式的玩家排行榜,可选参数为排行榜的人数(偷偷插一嘴,词影有细分模式的排行榜哦~ 用 help 自行探索咯!)。
|
|
198
|
+
- `wordleGame.排行榜.损益/总.胜场/总.输场/经典/CET4/CET6/GMAT/GRE/IELTS/SAT/TOEFL/考研/专八/专四/ALL/Lewdle/汉兜/Numberle/Math.胜场/输场/最快用时 [number:number]` - 查看不同模式的玩家排行榜,可选参数为排行榜的人数(偷偷插一嘴,词影有细分模式的排行榜哦~ 用 help 自行探索咯!)。
|
|
199
199
|
|
|
200
200
|
## 🌸测试图
|
|
201
201
|
|
|
@@ -282,8 +282,7 @@ npm install koishi-plugin-wordle-game
|
|
|
282
282
|
- [skywind3000/ECDICT](https://github.com/skywind3000/ECDICT) - 英汉语词典数据库
|
|
283
283
|
- [koishi-plugin-wordle](https://www.npmjs.com/package/koishi-plugin-wordle) - Wordle 经典模式词典
|
|
284
284
|
- [nonebot-plugin-wordle](https://github.com/noneplugin/nonebot-plugin-wordle) - Nonebot Wordle 的词典
|
|
285
|
-
- [Wordle 2315 words list](https://gist.github.com/DevilXD/6ad6cc1fe37872d069a795edd51233b2#file-wordle_words-txt) - 经典
|
|
286
|
-
Wordle 的单词列表
|
|
285
|
+
- [Wordle 2315 words list](https://gist.github.com/DevilXD/6ad6cc1fe37872d069a795edd51233b2#file-wordle_words-txt) - 经典 Wordle 的单词列表
|
|
287
286
|
|
|
288
287
|
## 🐱 QQ 群
|
|
289
288
|
|