📖 介绍
把网络天才 Akinator 搬进你的 Bot!
💿 安装
以下提到的方法 任选其一 即可
[推荐] 使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-akinator
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-akinator
pdm
pdm add nonebot-plugin-akinator
poetry
poetry add nonebot-plugin-akinator
conda
conda install nonebot-plugin-akinator
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入
[tool.nonebot]
plugins = [
# ...
"nonebot_plugin_akinator"
]
⚙️ 配置
在 nonebot2 项目的 .env 文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
PROXY |
否 | 无 | 访问 Akinator 使用的代理(仅在使用 HTTPX 时生效) |
AKINATOR_CHILD_MODE |
否 | False |
是否启用 Akinator 的儿童模式(结果不会出现 NSFW 人物) |
AKINATOR_LANGUAGE |
否 | cn |
Akinator 的语言 |
AKINATOR_TEXT_MODE |
否 | cn |
是否启用文字模式 |
AKINATOR_OPERATION_TIMEOUT |
否 | cn |
插件等待消息回复的超时时间 |
AKINATOR_REQUEST_TIMEOUT |
否 | cn |
插件网络请求的超时时间 |
AKINATOR_CLIENT_TYPE |
否 | playwright |
访问 Akinator 使用的客户端,可选 httpx 与 playwright |
AKINATOR_BASE_URL_TEMPLATE |
否 | ... |
自定义访问使用的 URL |
🎉 使用
发送指令 akinator / aki 即可开始游戏
开始游戏后,直接发送你的答案即可(序号和文字均可)
如无法使用请参见 #21
效果图
📞 联系
QQ:3076823485
Telegram:@lgc2333
吹水群:1105946125
邮箱:lgc2333@126.com
💡 鸣谢
lgc2333/cooaki
- Akinator API 的封装
💰 赞助
感谢大家的赞助!你们的赞助将是我继续创作的动力!
📝 更新日志
1.0.3
- 修复小问题
1.0.2
- 加入绕过 Cloudflare 的方式
- 在询问是否继续的超时之前,发送其他消息不会取消询问判定
1.0.1
- 修复 htmlrender 依赖不是可选的 bug
- 修复不会自动撤回游戏结束前一条问题消息的 Bug
1.0.0
- 插件重构:
- 整体代码重构,换用自己写的 API 包装库,使用 htmlrender 渲染图片,同时支持文本模式
- 配置项改动:
- 新增
AKINATOR_TEXT_MODE - 新增
AKINATOR_OPERATION_TIMEOUT - 新增
AKINATOR_REQUEST_TIMEOUT
- 新增
0.2.0
- 适配 Pydantic V1 & V2
- 换用 alconna
0.1.3
- 支持更多平台
- 删除猜出角色后继续猜的功能,因为有 Bug
Metadata
Release files for nonebot-plugin-akinator 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_akinator-1.0.3.tar.gz | 934.4 kB | Without provenance | Details for nonebot_plugin_akinator-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_akinator-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_akinator-1.0.3-py3-none-any.whl |
Total release size: 1.9 MB
Release files / nonebot_plugin_akinator-1.0.3.tar.gz
| Download URL | nonebot_plugin_akinator-1.0.3.tar.gz |
|---|---|
| Size | 934.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc5c73002a030b82ecdf903d876692ed30e8d6e2d464d350d1c4807571e29d46
|
|
BLAKE2b-256 checksum How to use checksums |
22c268741457b0b707cd49b9a51be8498f5d957886dac6228216bc4b5b0f9add
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.24.1 CPython/3.12.3 Linux/6.11.0-1013-azure
|
Release files / nonebot_plugin_akinator-1.0.3-py3-none-any.whl
| Download URL | nonebot_plugin_akinator-1.0.3-py3-none-any.whl |
|---|---|
| Size | 936.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81a669ee403bfbe673de025860357101c52bb6b578fc879f4f971389f3032feb
|
|
BLAKE2b-256 checksum How to use checksums |
a36907ec569f9b6b20df4b3515fdb0a1158f5d03d90fdb556d1a632d809d6c57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.24.1 CPython/3.12.3 Linux/6.11.0-1013-azure
|
Security for nonebot-plugin-akinator 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.