Skip to main content

nonebot-plugin-word-bank2

✨ 无数据库的轻量问答插件 ✨

功能

  • 无数据库的轻量问答插件
  • 支持模糊问答
  • 支持特殊回复
  • 自动转译 CQ 码
  • 支持图片回复
  • 支持指令大杂烩

安装

pip install nonebot-plugin-word-bank2

开始使用

问答教学

  • 设置词条命令由问句和答句组成。设置之后, 收到消息时触发。并非所有人都可以设置词条, 详见权限

  • 格式[模糊|全局|正则|@]问...答...

    • 模糊|正则 匹配模式中可任性一个或不选, 不选 表示 全匹配
    • 全局, @ 可与以上匹配模式组合使用
  • 教学中可以使用换行

    • 例如
      问
      123
      答
      456
      
  • 问答句中的首首尾空白字符会被自动忽略

  • 私聊好友个人也可以建立属于自己的词库, 可以实现类似备忘录的功能

问句选项

  • 问...答... 全匹配模式, 必须全等才能触发答

  • 模糊问...答... 当问句出现在消息里时则会触发

  • 正则问...答..., 当问句被消息正则捕获时则会匹配

  • 例如: 正则问[他你]不理答你被屏蔽了

    消息 回复
    他不理 你被屏蔽了
    他不理我 你被屏蔽了
    你不理我 你被屏蔽了
  • 全局问...答..., 在所有群聊和私聊中都可以触发, 可以和以上几种组合使用

    • 例如: 全局模糊问 晚安 答 不准睡
  • @问...答..., 只有 event.tome 时才会触发,如被@、被回复时或在私聊中,可以和以上几种组合使用

    • 例如: 全局模糊@问 晚安 答 不准睡
  • 问句可包含at 即在 QQ 聊天中手动 at 群友

    • 建议只在问...答...中使用
    • 例如: 问 @这是群名称 答 老婆!

答句选项

  • /at + qq号, 当答句中包含/at + qq号时将会被替换为@某人

    • 例如: 问 群主在吗 答 /at 123456789在吗
  • /self, 当答句中包含/self时将会被替换为发送者的群昵称

    • 例如: 问 我是谁 答 你是/self (群昵称为: 我老婆)
  • /atself, 当答句中包含/atself时将会被替换为@发送者

    • 例如: 问 谁是牛头人 答 @这是群昵称

删除词条

  • 删除[模糊|全局|正则|@]词条 + 需要删除的问句

    • 例如: 删除全局模糊@词条 你好
  • 以下指令需要结合自己的COMMAND_START 这里为 /

  • 删除词库: 删除当前群聊/私聊词库

    • 例如: /删除词库
  • 删除全局词库

    • 例如: /删除全局词库
  • 删除全部词库

    • 例如: /删除全部词库

查询词条

  • 超管查询指定词库

    • 查询[群|用户]{id}[全局][模糊|正则]词库
    • 例如:查询群123模糊词库 查询用户114514词库 查询全局词库
  • 查询指定词库

    • 查询[模糊|正则]词库
    • 例如 查询词库
  • 权限

群主 群管理 私聊好友 超级用户
增删词条 O O O O
增删全局词条 X X X O
删除词库 O O O O
删除全局词库 X X X O
删除全部词库 X X X O

特别感谢

优化建议

  • 请提交 issue 或者 pr

Metadata

Release files for nonebot-plugin-word-bank2 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-word-bank2 0.2.1
File Size Uploaded
nonebot_plugin_word_bank2-0.2.1.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-word-bank2 0.2.1
File Interpreter ABI Platform
nonebot_plugin_word_bank2-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 47.7 kB

Release files / nonebot_plugin_word_bank2-0.2.1.tar.gz

Download URL nonebot_plugin_word_bank2-0.2.1.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2b86c2eb06c1a14e0fafcaec26214ddd0340a52e16075940362e4574b6ba6dfb
BLAKE2b-256 checksum
How to use checksums
182c9a38c3bbe9e3309db721257d5fe080cb726a1f087b664d33a6392087e9dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 9, 2025.

Transparency log

Release files / nonebot_plugin_word_bank2-0.2.1-py3-none-any.whl

Download URL nonebot_plugin_word_bank2-0.2.1-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d54fb5892e6d3fbaefc28aa1de7a0d5d46fc1bec448709e0582212ebd2dc603e
BLAKE2b-256 checksum
How to use checksums
582c742802344e6c765573fbca29290ca2ad6b47cddbc5f42c93fcf88d532e18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 9, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page