功能
- 无数据库的轻量问答插件
- 支持模糊问答
- 支持特殊回复
- 自动转译 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)
| File | Size | Uploaded | |
|---|---|---|---|
| nonebot_plugin_word_bank2-0.2.1.tar.gz | 23.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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