📖 介绍
简单易用的黑名单插件,实现分插件拉黑用户/群聊/全局,无需修改插件源码
原理为插件运行前监听Matcher响应器属性
全平台支持,但是 二级群组可能存在问题
仅在 onebotV11 测试过,其余平台出现问题请提issue
已经支持白名单 , 即忽略黑名单设定, 未经测试,有问题提issue
现在即使拉黑全员 , 加群白依旧可以响应
请注意,本插件的实现均由 cubp.py实现,其余开发着可调用此模块进行插件内自动处理黑白名单.
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-authrespond
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-authrespond
pdm
pdm add nonebot-plugin-authrespond
poetry
poetry add nonebot-plugin-authrespond
conda
conda install nonebot-plugin-authrespond
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_authrespond"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| cubplugin_datadir | 否 | "" | 自定义配置文件路径,默认localstore |
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| #(全局/插件名称)(拉黑/解黑)(全员/用户id/@用户) | 主人 | 否 | 私聊/群聊 | 用户操作模式,全员则为插件停启用 |
| #(全局/插件名称)(封禁群/解禁群)(群号/留空封禁所在群) | 主人 | 否 | 私聊/群聊 | 群组操作模式 |
| #(全局/插件名称)(加白/去白)(用户id/@用户) | 主人 | 否 | 私聊/群聊 | 用户操作模式,添加白名单,忽略黑名单设定 |
| #(全局/插件名称)(加群白/去群白)(用户id/@用户) | 主人 | 否 | 私聊/群聊 | 群组操作模式,添加白名单,忽略黑名单设定 |
例如 #全局拉黑123456
[!tips] 插件名称为nonebot导入的插件,比如nonebot_plugin_cyberfurry 也可以使用cyberfurry(即去掉nonebot_plugin_) 插件名称检查来源为: nonebot.get_loaded_plugins() 中各属性的 plugin.name
Metadata
Release files for nonebot-plugin-authrespond 1.8
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_authrespond-1.8.tar.gz | 45.7 kB | Without provenance | Details for nonebot_plugin_authrespond-1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_authrespond-1.8-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_authrespond-1.8-py3-none-any.whl |
Total release size: 79.3 kB
Release files / nonebot_plugin_authrespond-1.8.tar.gz
| Download URL | nonebot_plugin_authrespond-1.8.tar.gz |
|---|---|
| Size | 45.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4f0fb19fc0f0b2b93d30ebcb2ba3994b5b71301eda13e8f77835ff34ab3db0e
|
|
BLAKE2b-256 checksum How to use checksums |
52165729477fc4f39200318d5a651a44ae4f0de10ac490831acd08d625b13d27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / nonebot_plugin_authrespond-1.8-py3-none-any.whl
| Download URL | nonebot_plugin_authrespond-1.8-py3-none-any.whl |
|---|---|
| Size | 33.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a2be7105c630426bc85f91d117a25cc28d05584344e72e44a2041d12ecd0ef4
|
|
BLAKE2b-256 checksum How to use checksums |
3dd1fa8bbd55a631f942af46fd3f434ce9fae6375910fb5caeb7f91d359b24a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for nonebot-plugin-authrespond 1.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.
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.