A group authentication plugin based on the Baize myth
Project description
NoneBot2 群入群验证插件 (nonebot-plugin-baize)
一个基于 NoneBot2 的群入群验证插件,通过向新入群用户提问进行验证,防止机器人恶意刷群。本版本已移除关键词匹配功能,只支持精确匹配。
功能特性
- 入群验证: 新用户入群时,插件会自动发送验证问题到用户的私聊。
- 题库管理: 支持从 JSON 文件加载题库,方便管理和更新题目。
- 精确答案验证: 用户必须输入与答案完全一致的内容才能通过验证。
- 超时自动移除: 如果用户在指定时间内未通过验证,插件会自动将其从群中移除。
- 灵活配置: 通过配置文件可以自定义题库路径、超时时间等参数。
使用方法
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-baize
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-baize
pdm
pdm add nonebot-plugin-baize
poetry
poetry add nonebot-plugin-baize
conda
conda install nonebot-plugin-baize
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_template"]
贡献
欢迎提交 Pull Request 来改进本项目!
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_baize-0.1.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_baize-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.22.3 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd9ea6682ae0544e17b044189f0317fa2b0078600cd2584b53ec7d04547f62e
|
|
| MD5 |
53a00050f954e41ee3cb1b0d95d05fbc
|
|
| BLAKE2b-256 |
ceb5ef69d1880314a79a1a754878f3af9ab334cc8e1912f7b47f3ec5cbbe9622
|
File details
Details for the file nonebot_plugin_baize-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_baize-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.22.3 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feb513b13a0e62e106c09ddfe1768c1420cb02c4372874a4051f2b3d46af09ab
|
|
| MD5 |
93cea62e59070a6252bbb9400e1d3aa2
|
|
| BLAKE2b-256 |
be74cecc6dcab4b7b5a2465dcd3c5333f2330ad44dbda34f745289bf9e69be1d
|