配置(可选)
| 名称 | 值 | 意义 | 默认值/推荐值 |
|---|---|---|---|
| no_repeat_mode | use, not_use | 白名单模式(use) or 黑名单模式(not_use) | not_use |
| no_repeat_groups | [12345, 23456] | 群聊号 | [] |
| no_repeat_threshold | 3 | 发送重复语句达到3条后视为复读(第三条会被阻止发送) | 3 |
| no_repeat_gap | 20 | 与上一条语句的发送间隔超过20s则不视为复读 | 20 |
白名单模式:仅在指定群内开启该功能
黑名单模式:仅在指定群内关闭该功能(比如你的机器人专用调试群),其他群均开启该功能
实现原理
https://v2.nonebot.dev/docs/next/advanced/runtime-hook#bot-api-%E8%B0%83%E7%94%A8%E9%92%A9%E5%AD%90
检测到异常复读情况后抛出MockApiException
Metadata
Release files for nonebot-plugin-no-repeat 0.0.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_no_repeat-0.0.1.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_no_repeat-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / nonebot_plugin_no_repeat-0.0.1.tar.gz
| Download URL | nonebot_plugin_no_repeat-0.0.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
853f2b11f599490eb2a39963480a3df86fc76914f2120ed4906e2483f23b628d
|
|
BLAKE2b-256 checksum How to use checksums |
dbae2e8b7cc19b0f0392fa80942950249561642f78ca5a348034ada570a5d4b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.8.3 Windows/10
|
Release files / nonebot_plugin_no_repeat-0.0.1-py3-none-any.whl
| Download URL | nonebot_plugin_no_repeat-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd1e2f0fa6776c718c06435ca30552b5527cbb17a81396efa8d6aabbb5a63275
|
|
BLAKE2b-256 checksum How to use checksums |
f71d20f43b05fc8f5417bb8a6ba0c978f025dfea2a5fed5e119fad08094e1e58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.8.3 Windows/10
|