koishi-plugin-wordle-game 2.7.0 → 2.7.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.
package/README.md CHANGED
@@ -1,156 +1,30 @@
1
1
  koishi-plugin-wordle-game
2
- ========================
2
+ =========================
3
3
 
4
- [<img alt="github" src="https://img.shields.io/badge/github-araea/wordle_game-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/araea/koishi-plugin-wordle-game)
4
+ [<img alt="github" src="https://img.shields.io/badge/github-araea/koishi__plugin__wordle__game-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/araea/koishi-plugin-wordle-game)
5
5
  [<img alt="npm" src="https://img.shields.io/npm/v/koishi-plugin-wordle-game.svg?style=for-the-badge&color=fc8d62&logo=npm" height="20">](https://www.npmjs.com/package/koishi-plugin-wordle-game)
6
6
 
7
- Koishi 的 Wordle | 汉兜 | 词影 | Numberle | Math | Lewdle 游戏插件。
8
-
9
- 支持以下游戏:
10
-
11
- - [Wordle](https://www.nytimes.com/games/wordle/index.html)
12
- - [汉兜](https://handle.antfu.me/)
13
- - [词影](https://cy.surprising.studio/)
14
- - [Numberle](https://dduarte.github.io/numberle/)
15
- - [Math](https://numberle.org/)
16
- - [Lewdle](https://www.lewdlegame.com/App)
7
+ Koishi 的多模式猜词游戏插件。
17
8
 
18
9
  ## 使用
19
10
 
20
- 1. 启用 `monetary`, `database`, `puppeteer` 服务。
21
- 2. 设置指令别名。
22
- 3. 输入 `wordleGame.开始` 指令以引导游戏。
23
- 4. 输入猜测词。
24
-
25
- ## 注意事项
26
-
27
- - 若输入成语时出现未知错误,可检查 `data/wordleGame/idioms.json` 文件,确认拼音是否正确。
28
- - 汉兜模式遇到词库里没有的四字词时,会调用配置项「拼音接口设置」里的 OpenAI 兼容接口补全拼音。
29
- 该项默认留空,留空时不会发起任何请求,只提示手动补全。
30
-
31
- ## 特性
32
-
33
- - 词影模式拥有细分排行榜,可通过 `help` 指令探索。
34
- - 可在 `idioms.json` 中自行添加成语(如“原神启动”),注意 JSON 格式,末项无逗号。
35
-
36
- ## 关键指令
37
-
38
- ### `wordleGame.开始 [待猜词长度]`
39
-
40
- 开始游戏引导。
41
-
42
- #### `wordleGame.开始.<模式> [待猜词长度]`
43
-
44
- - **可用模式**:
45
- - `经典`, `CET4/6`, `GMAT`, `GRE`, `IELTS`, `SAT`, `TOEFL`, `考研`, `专八/四`
46
- - `ALL`, `Lewdle`, `Numberle`, `Math`, `汉兜`, `词影`
47
-
48
- - **通用选项**:
49
-
50
- - `--hard` (困难模式)
51
- - 绿色线索必须保持固定。
52
- - 黄色线索必须重复使用。
53
- - 词影模式下,提高匹配难度。
54
-
55
- - `--uhard` (超困难模式)
56
- - 基于困难模式。
57
- - 黄色线索必须移离其原位。
58
- - 灰色线索不得再次使用。
59
-
60
- - `--absurd` (荒谬模式)
61
- - AI 将尽量避免给出答案,每次猜测仅透露最少信息,甚至可能更换秘密词。
62
- - [玩法参考](https://qntm.org/absurdle)
63
-
64
- - `--challenge` (挑战模式)
65
- - 高级玩家限定。要求从一个给定的目标词出发,反向推导秘密词。
66
- - [玩法参考](https://qntm.org/challenge)
67
-
68
- - `--wordles <数量>`
69
- - 同时猜测多个词,默认数量 1 ~ 4,可配置。
70
-
71
- - **汉兜 & 词影专属选项**:
72
-
73
- - `--free` (自由模式)
74
- - 任意四字词语均可作为猜测词。
75
-
76
- - `--all` (全成语模式)
77
- - 开启后,词库扩展至 29766+ (含生僻字,极难)。
78
- - 关闭时,使用 7208 个常用成语 (义务教育)。
79
-
80
- > 注:经典模式和汉兜模式可投入货币,获胜有奖励。可同时启用多种难度模式。
81
-
82
- ### `wordleGame.猜 <猜测内容>`
83
-
84
- - 猜单词、成语等。
85
- - 选项:
86
- - `-r`: 随机猜测一次。
87
-
88
- ---
89
-
90
- ## 测试图
91
-
92
- <!-- markdownlint-disable MD033 -->
93
- <details>
94
- <summary>点击展开/折叠</summary>
11
+ `wordleGame.开始` 开局,然后直接输入猜测词。
95
12
 
96
- - **经典模式**
97
- ![经典模式](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/dd55af6e-f38d-4f95-9bed-9d6ba967c429)
98
- - **汉兜模式**
99
- ![汉兜模式](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/d968f7fe-544b-4d29-a825-8ae59109a50b)
100
- - **词影模式**
101
- ![词影模式1](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/b11d911b-f534-4800-aef6-e42ef184803c)
102
- ![词影模式2](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/45810d3f-732e-4338-9351-b21f4dd9a814)
103
- - **方程式模式**
104
- ![方程式模式](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/b792df4b-baa2-4453-83f6-6fb58784b921)
105
- - **游戏引导**
106
- ![游戏引导](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/80bb3c2b-d41c-44e0-8a4d-acd1845c1644)
107
- - **进度查询**
108
- ![进度查询](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/65e28147-feef-4794-bbbb-9565c65cae36)
109
- - **多开模式**
110
- ![多开模式](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/86db4fcf-9a6f-4b15-8c50-6f2d7ea017e3)
111
- - **拼音速查**
112
- ![拼音速查](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/669c625a-9360-4d88-a0ec-01103e82d9f4)
113
- - **查单词 (英译中/英译英)**
114
- ![英译中](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/c1913df7-1e1a-4324-a228-ed1679e4e330)
115
- ![英译英](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/18f7806e-641c-4135-8255-73e139e7e427)
116
- - **查成语**
117
- ![查成语](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/76f88dd3-e0b1-48d4-bac7-6cafb0d996c7)
118
- - **玩家记录**
119
- ![玩家记录](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/a14dd774-4148-4a0e-b7bc-deab8180c919)
120
- - **单词查找器**
121
- ![单词查找器](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/4bad2757-8b49-4e39-b2b3-a311e6cfc08f)
122
- - **排行榜**
123
- ![排行榜](https://github.com/araea/koishi-plugin-wordle-game/assets/120614554/9d87c34f-353c-49ed-a885-5ac8128dbd4a)
13
+ ## 指令
124
14
 
125
- </details>
126
- <!-- markdownlint-enable MD033 -->
15
+ | 指令 | 说明 |
16
+ | --- | --- |
17
+ | `wordleGame.开始 [长度]` | 开始引导 |
18
+ | `wordleGame.开始.<模式> [长度]` | 指定模式开局 |
19
+ | `wordleGame.猜 <内容>` | 提交猜测 |
127
20
 
128
- ## 致谢
21
+ 模式:`经典`、`汉兜`、`词影`、`Numberle`、`Math`、`Lewdle` 及多种词库。
129
22
 
130
- - **框架**: [Koishi](https://koishi.chat/)
131
- - **纠错**: ly、麦神等朋友
132
- - **顾问**: [Akisa](https://forum.koishi.xyz/u/akisa/summary)
133
- - **数据源**:
134
- - [汉典](https://www.zdic.net/)
135
- - [百度汉语](https://hanyu.baidu.com/)
136
- - [WordFinder](https://wordword.org/)
137
- - [skywind3000/ECDICT](https://github.com/skywind3000/ECDICT)
138
- - **灵感与样式**:
139
- - [Wordle](https://www.nytimes.com/games/wordle/index.html)
140
- - [汉兜](https://handle.antfu.me/)
141
- - [词影](https://cy.surprising.studio/)
142
- - [Numberle (dduarte)](https://dduarte.github.io/numberle/)
143
- - [Numberle (numberle.org)](https://numberle.org/)
144
- - [LewdleGame](https://www.lewdlegame.com/App)
145
- - [WordlePlay](https://wordleplay.com/wordle-games)
146
- - **词典参考**:
147
- - [koishi-plugin-wordle](https://www.npmjs.com/package/koishi-plugin-wordle)
148
- - [nonebot-plugin-wordle](https://github.com/noneplugin/nonebot-plugin-wordle)
149
- - [Wordle 2315 words list](https://gist.github.com/DevilXD/6ad6cc1fe37872d069a795edd51233b2#file-wordle_words-txt)
23
+ 选项:`--hard`、`--uhard`、`--absurd`、`--challenge`、`--wordles`、`--free`、`--all`。
150
24
 
151
25
  ## QQ 群
152
26
 
153
- - `956758505`
27
+ 956758505
154
28
 
155
29
  <br>
156
30
 
package/lib/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "koishi";
2
- export declare const usage = "## \u4F7F\u7528\n\n1. \u542F\u7528 `monetary`\uFF0C`database` \u548C `puppeteer` \u670D\u52A1\u3002\n2. \u8BBE\u7F6E\u6307\u4EE4\u522B\u540D\u3002\n3. \u8F93\u5165 `wordleGame.\u5F00\u59CB` \u6307\u4EE4\u5F15\u5BFC\u6E38\u620F\u6A21\u5F0F\u3002\n4. \u8F93\u5165\u731C\u6D4B\u8BCD\u3002\n\n## \u6CE8\u610F\u4E8B\u9879\n\n- \u82E5\u8F93\u5165\u6210\u8BED\u65F6\u51FA\u73B0\u672A\u77E5\u9519\u8BEF\uFF0C\u53EF\u68C0\u67E5 `data/wordleGame/idioms.json` \u6587\u4EF6\uFF0C\u786E\u8BA4\u62FC\u97F3\u662F\u5426\u6B63\u786E\u3002\n\n## \u7279\u6027\n\n- \u8BCD\u5F71\u6A21\u5F0F\u62E5\u6709\u7EC6\u5206\u6392\u884C\u699C\uFF0C\u53EF\u901A\u8FC7 `help` \u6307\u4EE4\u63A2\u7D22\u3002\n- \u53EF\u5728 `idioms.json` \u4E2D\u81EA\u884C\u6DFB\u52A0\u6210\u8BED\uFF08\u5982\u201C\u539F\u795E\u542F\u52A8\u201D\uFF09\uFF0C\u6CE8\u610F JSON \u683C\u5F0F\uFF0C\u672B\u9879\u65E0\u9017\u53F7\u3002\n\n## \u5173\u952E\u6307\u4EE4\n\n### `wordleGame.\u5F00\u59CB [\u5F85\u731C\u8BCD\u957F\u5EA6]`\n\n\u5F00\u59CB\u6E38\u620F\u5F15\u5BFC\u3002\n\n#### `wordleGame.\u5F00\u59CB.<\u6A21\u5F0F> [\u5F85\u731C\u8BCD\u957F\u5EA6]`\n\n- **\u53EF\u7528\u6A21\u5F0F**:\n - `\u7ECF\u5178`, `CET4/6`, `GMAT`, `GRE`, `IELTS`, `SAT`, `TOEFL`, `\u8003\u7814`, `\u4E13\u516B/\u56DB`\n - `ALL`, `Lewdle`, `Numberle`, `Math`, `\u6C49\u515C`, `\u8BCD\u5F71`\n\n- **\u901A\u7528\u9009\u9879**:\n\n - `--hard` (\u56F0\u96BE\u6A21\u5F0F)\n - \u7EFF\u8272\u7EBF\u7D22\u5FC5\u987B\u4FDD\u6301\u56FA\u5B9A\u3002\n - \u9EC4\u8272\u7EBF\u7D22\u5FC5\u987B\u91CD\u590D\u4F7F\u7528\u3002\n - \u8BCD\u5F71\u6A21\u5F0F\u4E0B\uFF0C\u63D0\u9AD8\u5339\u914D\u96BE\u5EA6\u3002\n\n - `--uhard` (\u8D85\u56F0\u96BE\u6A21\u5F0F)\n - \u57FA\u4E8E\u56F0\u96BE\u6A21\u5F0F\u3002\n - \u9EC4\u8272\u7EBF\u7D22\u5FC5\u987B\u79FB\u79BB\u5176\u539F\u4F4D\u3002\n - \u7070\u8272\u7EBF\u7D22\u4E0D\u5F97\u518D\u6B21\u4F7F\u7528\u3002\n\n - `--absurd` (\u8352\u8C2C\u6A21\u5F0F)\n - AI \u5C06\u5C3D\u91CF\u907F\u514D\u7ED9\u51FA\u7B54\u6848\uFF0C\u6BCF\u6B21\u731C\u6D4B\u4EC5\u900F\u9732\u6700\u5C11\u4FE1\u606F\uFF0C\u751A\u81F3\u53EF\u80FD\u66F4\u6362\u79D8\u5BC6\u8BCD\u3002\n - [\u73A9\u6CD5\u53C2\u8003](https://qntm.org/absurdle)\n\n - `--challenge` (\u6311\u6218\u6A21\u5F0F)\n - \u9AD8\u7EA7\u73A9\u5BB6\u9650\u5B9A\u3002\u8981\u6C42\u4ECE\u4E00\u4E2A\u7ED9\u5B9A\u7684\u76EE\u6807\u8BCD\u51FA\u53D1\uFF0C\u53CD\u5411\u63A8\u5BFC\u79D8\u5BC6\u8BCD\u3002\n - [\u73A9\u6CD5\u53C2\u8003](https://qntm.org/challenge)\n\n - `--wordles <\u6570\u91CF>`\n - \u540C\u65F6\u731C\u6D4B\u591A\u4E2A\u8BCD\uFF0C\u9ED8\u8BA4\u6570\u91CF 1 ~ 4\uFF0C\u53EF\u914D\u7F6E\u3002\n\n- **\u6C49\u515C & \u8BCD\u5F71\u4E13\u5C5E\u9009\u9879**:\n\n - `--free` (\u81EA\u7531\u6A21\u5F0F)\n - \u4EFB\u610F\u56DB\u5B57\u8BCD\u8BED\u5747\u53EF\u4F5C\u4E3A\u731C\u6D4B\u8BCD\u3002\n\n - `--all` (\u5168\u6210\u8BED\u6A21\u5F0F)\n - \u5F00\u542F\u540E\uFF0C\u8BCD\u5E93\u6269\u5C55\u81F3 29766+ (\u542B\u751F\u50FB\u5B57\uFF0C\u6781\u96BE)\u3002\n - \u5173\u95ED\u65F6\uFF0C\u4F7F\u7528 7208 \u4E2A\u5E38\u7528\u6210\u8BED (\u4E49\u52A1\u6559\u80B2)\u3002\n\n> \u6CE8\uFF1A\u7ECF\u5178\u6A21\u5F0F\u548C\u6C49\u515C\u6A21\u5F0F\u53EF\u6295\u5165\u8D27\u5E01\uFF0C\u83B7\u80DC\u6709\u5956\u52B1\u3002\u53EF\u540C\u65F6\u542F\u7528\u591A\u79CD\u96BE\u5EA6\u6A21\u5F0F\u3002\n\n### `wordleGame.\u731C <\u731C\u6D4B\u5185\u5BB9>`\n\n- \u731C\u5355\u8BCD\u3001\u6210\u8BED\u7B49\u3002\n- \u9009\u9879:\n - `-r`: \u968F\u673A\u731C\u6D4B\u4E00\u6B21\u3002\n\n## QQ \u7FA4\n\n- 956758505\n";
2
+ export declare const usage = "## \u4F7F\u7528\n\n`wordleGame.\u5F00\u59CB` \u5F00\u5C40\uFF0C\u7136\u540E\u76F4\u63A5\u8F93\u5165\u731C\u6D4B\u8BCD\u3002\n\n## \u6307\u4EE4\n\n| \u6307\u4EE4 | \u8BF4\u660E |\n| --- | --- |\n| `wordleGame.\u5F00\u59CB [\u957F\u5EA6]` | \u5F00\u59CB\u5F15\u5BFC |\n| `wordleGame.\u5F00\u59CB.<\u6A21\u5F0F> [\u957F\u5EA6]` | \u6307\u5B9A\u6A21\u5F0F\u5F00\u5C40 |\n| `wordleGame.\u731C <\u5185\u5BB9>` | \u63D0\u4EA4\u731C\u6D4B |\n\n\u6A21\u5F0F\uFF1A`\u7ECF\u5178`\u3001`\u6C49\u515C`\u3001`\u8BCD\u5F71`\u3001`Numberle`\u3001`Math`\u3001`Lewdle` \u53CA\u591A\u79CD\u8BCD\u5E93\u3002\n\n\u9009\u9879\uFF1A`--hard`\u3001`--uhard`\u3001`--absurd`\u3001`--challenge`\u3001`--wordles`\u3001`--free`\u3001`--all`\u3002";
3
3
  export interface Config {
4
4
  isDarkThemeEnabled: boolean;
5
5
  isHighContrastThemeEnabled: boolean;
@@ -20,11 +20,6 @@ export interface Config {
20
20
  retractDelay: number;
21
21
  imageType: "png" | "jpeg" | "webp";
22
22
  isTextToImageConversionEnabled: boolean;
23
- isEnableQQOfficialRobotMarkdownTemplate: boolean;
24
- customTemplateId: string;
25
- key: string;
26
- numberOfMessageButtonsPerRow: number;
27
- isUsingUnifiedKoishiBuiltInUsername: boolean;
28
23
  pinyinApiEndpoint: string;
29
24
  pinyinApiKey: string;
30
25
  pinyinApiModel: string;
package/lib/context.d.ts CHANGED
@@ -5,7 +5,6 @@ export interface GameContext {
5
5
  ctx: Context;
6
6
  config: Config;
7
7
  logger: Logger;
8
- isQQOfficialRobotMarkdownTemplateEnabled: boolean;
9
8
  paths: {
10
9
  wordleGameDir: string;
11
10
  idioms: string;
@@ -27,7 +26,4 @@ export interface GameContext {
27
26
  id: string;
28
27
  timestamp: number;
29
28
  }>;
30
- msgSeqMap: {
31
- [msgId: string]: number;
32
- };
33
29
  }