Skip to main content

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

MIT

Metadata

Release files for nonebot-plugin-baize 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-baize 1.2.0
File Size Uploaded
nonebot_plugin_baize-1.2.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-baize 1.2.0
File Interpreter ABI Platform
nonebot_plugin_baize-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / nonebot_plugin_baize-1.2.0.tar.gz

Download URL nonebot_plugin_baize-1.2.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fd13ba2d5059fa62a029fa0bf1d821443f676440e3a4dd1a42df90c1cb3b0dc0
BLAKE2b-256 checksum
How to use checksums
af0bf8d50b2d347262fdef6415830b2c871694636822e1631d81e7cb65c7d8f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.23.0 CPython/3.12.3 Linux/6.8.0-1021-azure

Release files / nonebot_plugin_baize-1.2.0-py3-none-any.whl

Download URL nonebot_plugin_baize-1.2.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f173b8be9f81d7d81ad90eb16c13f8a6491f849962c8871f37d7f4eb9cdf787
BLAKE2b-256 checksum
How to use checksums
12f5f1b3ed4ec9e254adfe43b134e46520685cc9e96e6916f046673131dfd187
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.23.0 CPython/3.12.3 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page