📖 介绍
这是一个简单的 nonebot2 的猜词游戏 (Wordle) 插件,没有次数限制,可以自定义词库,支持群聊白名单和用户黑名单。
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-wordle-simple
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-wordle-simple
pdm
pdm add nonebot-plugin-wordle-simple
poetry
poetry add nonebot-plugin-wordle-simple
conda
conda install nonebot-plugin-wordle-simple
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_wordle_simple"]
⚙️ 配置
在 nonebot2 项目的 .env 文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| wordle__command_priority | 否 | 10 | 命令响应优先级 |
| wordle__groups_enabled | 是 | - | 白名单群聊, 格式为字符串列表 |
| wordle__ban_user | 否 | [] |
黑名单用户, 格式为字符串列表 |
| wordle__length_min | 否 | 4 | 最小单词长度 |
| wordle__length_max | 否 | 12 | 最大单词长度 |
| wordle__debug_enabled | 否 | False | 是否启用调试指令 |
| wordle__font_path | 否 | ./resources/FiraCode-Medium.ttf |
字体文件路径 |
| wordle__dictionary_answer_path | 否 | ./resources/DictionaryAnswer.txt |
答案词库路径 |
| wordle__dictionary_guess_path | 否 | ./resources/DictionaryGuess.txt |
猜词词库路径 |
注意:
- 路径配置可使用相对路径 (相对于插件安装目录) 或绝对路径
- 默认词库包括 8000 常见答案词和 161700 常见可猜词
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| wordle.debug_enable | 主人 | 否 | 全部 | 启用调试 |
| wordle.debug_disable | 主人 | 否 | 全部 | 禁用调试 |
| wordle.change_min_length | 主人 | 否 | 全部 | 更改最小单词长度 |
| wordle.change_max_length | 主人 | 否 | 全部 | 更改最大单词长度 |
| wordle.enable | 群管 | 是 | 群聊 | 将本群加入白名单 |
| wordle.disable | 群管 | 是 | 群聊 | 将本群移出白名单 |
| wordle.help | 群员 | 否 | 白名单群 | 帮助 |
| wordle.help <指令> | 群员 | 否 | 白名单群 | 特定指令的帮助 |
| wordle.rule | 群员 | 否 | 白名单群 | 游戏规则 (弃用) |
| wordle.start <单词长度> | 群员 | 否 | 白名单群 | 启动一局游戏 |
| wordle.guess <单词> | 群员 | 否 | 白名单群 | 猜测某词 |
| wordle.giveup | 群员 | 是 | 白名单群 | 放弃一局游戏 |
| wordle.remain | 群员 | 否 | 白名单群 | 给出未使用的字母 |
| wordle.history | 群员 | 否 | 白名单群 | 显示猜测历史 |
| wordle.debug | 群员 | 否 | 白名单群 | 给出答案或词典 (调试用) |
效果图
暂无
Metadata
Release files for nonebot-plugin-wordle-simple 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nonebot_plugin_wordle_simple-0.0.10.tar.gz | 586.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_wordle_simple-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / nonebot_plugin_wordle_simple-0.0.10.tar.gz
| Download URL | nonebot_plugin_wordle_simple-0.0.10.tar.gz |
|---|---|
| Size | 586.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adb9cc73e9bb19ad2ef09fb5e69b0b161aab9bde10b7cad332ddf99ecbffd394
|
|
BLAKE2b-256 checksum How to use checksums |
0ffaa4d605c284d104ee2335af79e1934ded013be97709a05b44f5985e4f66e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / nonebot_plugin_wordle_simple-0.0.10-py3-none-any.whl
| Download URL | nonebot_plugin_wordle_simple-0.0.10-py3-none-any.whl |
|---|---|
| Size | 585.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14ca670d27861993d2a449f59b4a3915e2399907540085afee75eb88f0671102
|
|
BLAKE2b-256 checksum How to use checksums |
9760137409792961c182b213da8f1c104b62e38a08451fa77149df06821f1156
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|