Skip to main content

Internet Genius - Akinator

Project description

NoneBotPluginLogo

NoneBotPluginText

NoneBot-Plugin-Akinator

✨ 网络天才 ✨

python pdm-managed wakatime
Pydantic Version 1 Or 2 license pypi pypi download
NoneBot Registry Supported Adapters

📖 介绍

把网络天才 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 使用的客户端,可选 httpxplaywright
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_akinator-1.0.3.tar.gz (934.4 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_akinator-1.0.3-py3-none-any.whl (936.0 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_akinator-1.0.3.tar.gz.

File metadata

  • Download URL: nonebot_plugin_akinator-1.0.3.tar.gz
  • Upload date:
  • Size: 934.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.24.1 CPython/3.12.3 Linux/6.11.0-1013-azure

File hashes

Hashes for nonebot_plugin_akinator-1.0.3.tar.gz
Algorithm Hash digest
SHA256 fc5c73002a030b82ecdf903d876692ed30e8d6e2d464d350d1c4807571e29d46
MD5 aa04f6e5e723440f145c976d5701ae26
BLAKE2b-256 22c268741457b0b707cd49b9a51be8498f5d957886dac6228216bc4b5b0f9add

See more details on using hashes here.

File details

Details for the file nonebot_plugin_akinator-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_akinator-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 81a669ee403bfbe673de025860357101c52bb6b578fc879f4f971389f3032feb
MD5 bed5cd0f1767d1f65bcc78c0025d584c
BLAKE2b-256 a36907ec569f9b6b20df4b3515fdb0a1158f5d03d90fdb556d1a632d809d6c57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page