Skip to main content

nonebot-plugin-handle

适用于 Nonebot2 的 汉字Wordle 猜成语插件

安装

  • 使用 nb-cli
nb plugin install nonebot_plugin_handle
  • 使用 pip
pip install nonebot_plugin_handle

配置项

以下配置项可在 .env.* 文件中设置,具体参考 NoneBot 配置方式

handle_strict_mode

  • 类型:bool
  • 默认:False
  • 说明:是否启用严格模式,开启后猜测的短语必须是成语

handle_color_enhance

  • 类型:bool
  • 默认:False
  • 说明:是否启用色彩增强模式

使用

以下命令需要加命令前缀 (默认为/),可自行设置为空,此处省略

[@Bot] 猜成语/handle
[@Bot] 结束/结束猜成语/结束游戏

规则

你有十次的机会猜一个四字词语;

每次猜测后,汉字与拼音的颜色将会标识其与正确答案的区别;

汉字的右上角标的数字1、2、3、4分别对应一、二、三、四声;

青色 表示其出现在答案中且在正确的位置;

橙色 表示其出现在答案中但不在正确的位置,至多着色 此单词中有这个字母的数量 次;

每个格子的 汉字、声母、韵母、声调 都会独立进行颜色的指示。

当四个格子都为青色时,你便赢得了游戏!

可发送“结束”结束游戏;可发送“提示”查看提示。

使用 --strict 选项开启成语检查,即猜测的短语必须是成语,如:

[@Bot] handle --strict

注:--strict 仅在 handle_strict_mode 被设置为 False 时生效。

示例

说明

橙色块着色规则为:

橙色块至多着色 此成语中有这个元素的数量 次。

同时其满足:

橙色块着色数量 + 青色块着色数量 <= 此成语中有这个元素的数量。

类似Wordle,这意味着:

如果答案是 zu2 bu4 chu1 hu4

玩家猜测 hu1 xx1 xx1 xx1(x代表无关),则

h 标为橙色。

1 声在第 3 格标记青色,其他为灰色。(因为着青色的数量达到最大值 1)

玩家猜测 hu4 hu4 su4 su4,则

第 1 个 h 着橙色,第 2 个 h 着灰色。(因为着青色的数量达到最大值 1)

4 声在第 2、4 格着青色,在第 1、3 格着灰色。(因为着青色的数量达到最大值 2)

四个 u 全部标记为青色。

特殊标记

在旧版 nonebot-plugin-handle(<0.3.2) 中,若出现连续标黄的拼音,玩家无法判断其是出自同一个字还是不同的字,如下图所示。

image.png

更新后,若所猜拼音下,出现双下划线,则代表该声母/韵母是出自同一个出现在答案中的字。

这张图片的含义是:成语中出现了 xin 这个拼音的字,但位置不正确。

image.png

这张图片的含义是:成语中,所猜位置是 xin1,但不是新这个字。(正确答案是心)

image.png

特别感谢

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_handle-0.4.4.tar.gz (10.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_handle-0.4.4-py3-none-any.whl (10.0 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_handle-0.4.4.tar.gz.

File metadata

  • Download URL: nonebot_plugin_handle-0.4.4.tar.gz
  • Upload date:
  • Size: 10.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.0 Linux/6.5.0-1025-azure

File hashes

Hashes for nonebot_plugin_handle-0.4.4.tar.gz
Algorithm Hash digest
SHA256 466c86312c97948968930133b5e6bded08eba605f1c260c069d84de11e646363
MD5 d8173a4f2da12fa6238137c36fe4adc6
BLAKE2b-256 0b80d45245478ce88f8b3598d8b7439d966429dedc1d903b823a746d0bb2c3e0

See more details on using hashes here.

File details

Details for the file nonebot_plugin_handle-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_handle-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7205a66851b2e6e954582bfb84ec68b2c7bbbdbda0f8042f060b9346973b1da0
MD5 dea4e50a01ed41b4cdd1814bbc07f1d6
BLAKE2b-256 011182afc4bf5f984a5d5054f09ba37654da26ce6c5c091208ffdd9ce78dd3e6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.4 This release

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2.1

2 files

0.1.2

2 files

0.1.1.1

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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