koishi-plugin-wordle-game 2.1.8 → 2.2.0

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 -0
  2. package/package.json +7 -2
package/lib/index.js CHANGED
@@ -1863,6 +1863,7 @@ ${rankType3.map((type, index) => `${index + 1}. ${type}`).join('\n')}
1863
1863
  await page.setContent(html, { waitUntil: 'load' });
1864
1864
  const imageBuffer = await page.screenshot({ fullPage: true, type: config.imageType });
1865
1865
  await page.close();
1866
+ await context.close();
1866
1867
  return imageBuffer;
1867
1868
  }
1868
1869
  async function deductMoney(channelId, platform) {
@@ -1962,6 +1963,7 @@ ${rankType3.map((type, index) => `${index + 1}. ${type}`).join('\n')}
1962
1963
  await page.setContent(html, { waitUntil: 'load' });
1963
1964
  const wordlesImageBuffer = await page.screenshot({ fullPage: true, type: config.imageType });
1964
1965
  await page.close();
1966
+ await context.close();
1965
1967
  return wordlesImageBuffer;
1966
1968
  }
1967
1969
  async function getLeaderboardWinOrLose(type, number, statKey, label) {
@@ -2500,6 +2502,7 @@ ${rankType3.map((type, index) => `${index + 1}. ${type}`).join('\n')}
2500
2502
  await page.setContent(html, { waitUntil: 'load' });
2501
2503
  const imageBuffer = await page.screenshot({ fullPage: true, type: config.imageType });
2502
2504
  await page.close();
2505
+ await context.close();
2503
2506
  return imageBuffer;
2504
2507
  }
2505
2508
  async function generateImageForCiying(gridHtml, rowNum) {
@@ -2544,6 +2547,7 @@ ${gridHtml}
2544
2547
  await page.setContent(html, { waitUntil: 'load' });
2545
2548
  const imageBuffer = await page.screenshot({ fullPage: true, type: config.imageType });
2546
2549
  await page.close();
2550
+ await context.close();
2547
2551
  return imageBuffer;
2548
2552
  }
2549
2553
  async function generateImageForHandle(gridHtml) {
@@ -2578,6 +2582,7 @@ ${gridHtml}
2578
2582
  await page.setContent(html, { waitUntil: 'load' });
2579
2583
  const imageBuffer = await page.screenshot({ fullPage: true, type: config.imageType });
2580
2584
  await page.close();
2585
+ await context.close();
2581
2586
  return imageBuffer;
2582
2587
  }
2583
2588
  async function getPlayerUid(platform, userId) {
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.1.8",
4
+ "version": "2.2.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -53,7 +53,12 @@
53
53
  "猜数字",
54
54
  "猜方程式",
55
55
  "数学方程式",
56
- "数字"
56
+ "数字",
57
+ "ciying",
58
+ "cy",
59
+ "词影",
60
+ "填字游戏",
61
+ "猜"
57
62
  ],
58
63
  "peerDependencies": {
59
64
  "koishi": "^4.17.2"