koishi-plugin-wordle-game 2.2.5 → 2.2.6

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 +5 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1298,7 +1298,7 @@ async function apply(ctx, config) {
1298
1298
  finalSettlementString = await processNonZeroMoneyPlayers(channelId, platform);
1299
1299
  }
1300
1300
  // 玩家记录赢
1301
- await updatePlayerRecordsWin(channelId, gameInfo); // db*
1301
+ await updatePlayerRecordsWin(channelId, gameInfo);
1302
1302
  // 增加该玩家猜出单词的次数
1303
1303
  const [playerRecord] = await ctx.database.get('wordle_player_records', { userId });
1304
1304
  // 更新最快用时
@@ -1927,7 +1927,7 @@ ${rankType3.map((type, index) => `${index + 1}. ${type}`).join('\n')}
1927
1927
  return await sendMessage(session, await getLeaderboardFastestGuessTime(type, number));
1928
1928
  });
1929
1929
  });
1930
- ctx.command('wordleGame.排行榜.词影.猜出次数 [number:number]', '查看玩家猜出次数排行榜(词影)') // db*
1930
+ ctx.command('wordleGame.排行榜.词影.猜出次数 [number:number]', '查看玩家猜出次数排行榜(词影)')
1931
1931
  .option('hard', '--hard 查看困难模式', { fallback: false })
1932
1932
  .option('wordles', '--wordles <value:number> 查看多猜测模式', { fallback: 1 })
1933
1933
  .action(async ({ session, options }, number = config.defaultMaxLeaderboardEntries) => {
@@ -1983,7 +1983,9 @@ ${rankType3.map((type, index) => `${index + 1}. ${type}`).join('\n')}
1983
1983
  if (wordlesNum >= 2 && wordlesNum <= 4) {
1984
1984
  fastestGuessTimeField = `fastestGuessTimeIn${wordlesNum}Mode`;
1985
1985
  }
1986
- sortedPlayers = getPlayers.sort((a, b) => a.extraCiyingRankInfo[fastestGuessTimeField] - b.extraCiyingRankInfo[fastestGuessTimeField]);
1986
+ sortedPlayers = getPlayers
1987
+ .filter(player => player.extraCiyingRankInfo[fastestGuessTimeField] > 0)
1988
+ .sort((a, b) => a.extraCiyingRankInfo[fastestGuessTimeField] - b.extraCiyingRankInfo[fastestGuessTimeField]);
1987
1989
  const topPlayers = sortedPlayers.slice(0, number);
1988
1990
  result = `${title}:\n`;
1989
1991
  topPlayers.forEach((player, index) => {
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.5",
4
+ "version": "2.2.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [