koishi-plugin-wordle-game 2.2.0 → 2.2.2

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 +8 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1614,7 +1614,7 @@ ${generateStatsInfo(stats, fastestGuessTime)}
1614
1614
  // 返回信息
1615
1615
  const { correctLetters, presentLetters, isHardMode, gameMode, guessWordLength, absentLetters, isAbsurd, isChallengeMode, targetWord, wordlesNum, isUltraHardMode, presentLettersWithIndex, correctPinyinsWithIndex, presentPinyins, presentPinyinsWithIndex, absentPinyins, absentTones, presentTonesWithIndex, correctTonesWithIndex, presentTones } = gameInfo;
1616
1616
  const usernameMention = `【@${username}】`;
1617
- const inputLengthMessage = `待猜${gameMode === '汉兜' ? '词语' : gameMode === 'Numberle' ? '数字' : gameMode === 'Math' ? '数学方程式' : '单词'}的长度为:【${guessWordLength}】`;
1617
+ const inputLengthMessage = `待猜${gameMode === '汉兜' || gameMode === '词影' ? '词语' : gameMode === 'Numberle' ? '数字' : gameMode === 'Math' ? '数学方程式' : '单词'}的长度为:【${guessWordLength}】`;
1618
1618
  const extraGameInfo = wordlesNum > 1 ? `\n${await processExtraGameInfos(channelId)}` : '';
1619
1619
  const gameDuration = calculateGameDuration(gameInfo.timestamp, timestamp);
1620
1620
  const progressInfo = `当前${gameDuration}\n当前进度:【${correctLetters.join('')}】`;
@@ -1731,9 +1731,13 @@ ${rankType.map((type, index) => `${index + 1}. ${type}`).join('\n')}
1731
1731
  if (typeof number !== 'number' || isNaN(number) || number < 0) {
1732
1732
  return '请输入大于等于 0 的数字作为排行榜的参数。';
1733
1733
  }
1734
- const rankType3 = [
1735
- "胜场", "输场", "最快用时"
1736
- ];
1734
+ let rankType3;
1735
+ if (type === '总') {
1736
+ rankType3 = ["胜场", "输场"];
1737
+ }
1738
+ else {
1739
+ rankType3 = ["胜场", "输场", "最快用时"];
1740
+ }
1737
1741
  await sendMessage(session, `当前可查看排行榜如下:
1738
1742
  ${rankType3.map((type, index) => `${index + 1}. ${type}`).join('\n')}
1739
1743
  请输入想要查看的【类型名】或【序号】:`);
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/) |... 猜单词|猜成语|猜数字|猜数学方程式|... 的小游戏,包含多种词库、多种主题、多种游戏设置和排行榜系统。",
4
- "version": "2.2.0",
4
+ "version": "2.2.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [