This release is a pre-release and may not be stable for production use.
功能
- 无数据库的轻量问答插件
- 支持模糊问答
- 支持特殊回复
- 自动转译 CQ 码
- 支持图片回复
- 支持指令大杂烩
安装
pip install nonebot-plugin-word-bank3
导入
nonebot.load_plugin("nonebot_plugin_tortoise_orm") # 务必最先导入数据库
nonebot.load_plugin("nonebot_plugin_word_bank3")
开始使用
问答教学
-
设置词条命令由
问句和答句组成。设置之后, 收到消息时触发。并非所有人都可以设置词条, 详见权限 -
格式
[模糊|全局|正则|@]问...答...模糊|正则匹配模式中可任性一个或不选,不选表示全匹配全局,@可与以上匹配模式组合使用
-
教学中可以使用换行
- 例如
问 123 答 456
- 例如
-
问答句中的首首尾空白字符会被自动忽略
-
私聊好友个人也可以建立属于自己的词库, 可以实现类似备忘录的功能
问句选项
-
问...答...全匹配模式, 必须全等才能触发答 -
模糊问...答...当问句出现在消息里时则会触发 -
正则问...答..., 当问句被消息正则捕获时则会匹配 -
例如: 正则问[他你]不理答你被屏蔽了
消息 回复 他不理 你被屏蔽了 他不理我 你被屏蔽了 你不理我 你被屏蔽了 -
全局问...答..., 在所有群聊和私聊中都可以触发, 可以和以上几种组合使用- 例如:
全局模糊问 晚安 答 不准睡
- 例如:
-
@问...答..., 只有event.tome时才会触发,如被@、被回复时或在私聊中,可以和以上几种组合使用- 例如:
全局模糊@问 晚安 答 不准睡
- 例如:
-
问句可包含
at即在 QQ 聊天中手动 at 群友- 建议只在
问...答...中使用 - 例如:
问 @这是群名称 答 老婆!
- 建议只在
答句选项
-
/at+qq号, 当答句中包含/at+qq号时将会被替换为@某人- 例如:
问 群主在吗 答 /at 123456789在吗
- 例如:
-
/self, 当答句中包含/self时将会被替换为发送者的群昵称- 例如:
问 我是谁 答 你是/self(群昵称为: 我老婆)
- 例如:
-
/atself, 当答句中包含/atself时将会被替换为@发送者- 例如:
问 谁是牛头人 答 @这是群昵称
- 例如:
删除词条
-
删除[模糊|全局|正则|@]词条+ 需要删除的问句- 例如:
删除全局模糊@词条 你好
- 例如:
-
以下指令需要结合自己的
COMMAND_START这里为/ -
删除词库: 删除当前群聊/私聊词库
- 例如:
/删除词库
- 例如:
-
删除全局词库
- 例如:
/删除全局词库
- 例如:
-
删除全部词库
- 例如:
/删除全部词库
- 例如:
-
权限
| 群主 | 群管理 | 私聊好友 | 超级用户 | |
|---|---|---|---|---|
| 增删词条 | O | O | O | O |
| 增删全局词条 | X | X | X | O |
| 删除词库 | O | O | O | O |
| 删除全局词库 | X | X | X | O |
| 删除全部词库 | X | X | X | O |
特别感谢
我自己写的kexue-z/nonebot-plugin-word-bank2- 超级好用的 Mrs4s/go-cqhttp
- 有超多超强群友的 nonebot/nonebot2
- 最初来源的 Joenothing-lst/word-bank
- 超级大佬的 MeetWq
优化建议
- 请提交 issue 或者 pr
Metadata
Release files for nonebot-plugin-word-bank3 0.1.0a3
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-word-bank3-0.1.0a3.tar.gz | 11.9 kB | Without provenance | Details for nonebot-plugin-word-bank3-0.1.0a3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_word_bank3-0.1.0a3-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_word_bank3-0.1.0a3-py3-none-any.whl |
Total release size: 23.8 kB
Release files / nonebot-plugin-word-bank3-0.1.0a3.tar.gz
| Download URL | nonebot-plugin-word-bank3-0.1.0a3.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f0c358bef93cc2cd36967be677a84ff0678ddba072393c6b6b6b1337df41c3b
|
|
BLAKE2b-256 checksum How to use checksums |
a318d2dd2ca7732417eb2ce930548161df33a657c4b8da1a35c0361940dbfc7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1031-azure
|
Release files / nonebot_plugin_word_bank3-0.1.0a3-py3-none-any.whl
| Download URL | nonebot_plugin_word_bank3-0.1.0a3-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
777dc6500c2d0bdfee8644215aa06a7f1bb837b3ce21a9a14264ff345149a6e1
|
|
BLAKE2b-256 checksum How to use checksums |
86330a34efbf5b7e404b9b05c96918552ffb791cb5dfabe1c474f9e88f288382
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1031-azure
|
Security for nonebot-plugin-word-bank3 0.1.0a3
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.