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 +13 -139
- package/lib/config.d.ts +1 -6
- package/lib/context.d.ts +0 -4
- package/lib/index.js +259 -1397
- package/lib/services/message.d.ts +1 -4
- package/lib/services/user.d.ts +1 -1
- package/lib/types.d.ts +0 -15
- package/lib/utils/string.d.ts +0 -1
- package/package.json +3 -3
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/
|
|
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
|
|
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
|
-
|
|
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
|
-

|
|
98
|
-
- **汉兜模式**
|
|
99
|
-

|
|
100
|
-
- **词影模式**
|
|
101
|
-

|
|
102
|
-

|
|
103
|
-
- **方程式模式**
|
|
104
|
-

|
|
105
|
-
- **游戏引导**
|
|
106
|
-

|
|
107
|
-
- **进度查询**
|
|
108
|
-

|
|
109
|
-
- **多开模式**
|
|
110
|
-

|
|
111
|
-
- **拼音速查**
|
|
112
|
-

|
|
113
|
-
- **查单词 (英译中/英译英)**
|
|
114
|
-

|
|
115
|
-

|
|
116
|
-
- **查成语**
|
|
117
|
-

|
|
118
|
-
- **玩家记录**
|
|
119
|
-

|
|
120
|
-
- **单词查找器**
|
|
121
|
-

|
|
122
|
-
- **排行榜**
|
|
123
|
-

|
|
13
|
+
## 指令
|
|
124
14
|
|
|
125
|
-
|
|
126
|
-
|
|
15
|
+
| 指令 | 说明 |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `wordleGame.开始 [长度]` | 开始引导 |
|
|
18
|
+
| `wordleGame.开始.<模式> [长度]` | 指定模式开局 |
|
|
19
|
+
| `wordleGame.猜 <内容>` | 提交猜测 |
|
|
127
20
|
|
|
128
|
-
|
|
21
|
+
模式:`经典`、`汉兜`、`词影`、`Numberle`、`Math`、`Lewdle` 及多种词库。
|
|
129
22
|
|
|
130
|
-
|
|
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
|
-
|
|
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\
|
|
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
|
}
|