Skip to main content

基于白泽神话的群验证插件

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_baize-1.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_baize-1.2.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_baize-1.2.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_baize-1.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.23.0 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for nonebot_plugin_baize-1.2.0.tar.gz
Algorithm Hash digest
SHA256 fd13ba2d5059fa62a029fa0bf1d821443f676440e3a4dd1a42df90c1cb3b0dc0
MD5 f2905f483e2bba93db81006c8f58209e
BLAKE2b-256 af0bf8d50b2d347262fdef6415830b2c871694636822e1631d81e7cb65c7d8f8

See more details on using hashes here.

File details

Details for the file nonebot_plugin_baize-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_baize-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f173b8be9f81d7d81ad90eb16c13f8a6491f849962c8871f37d7f4eb9cdf787
MD5 e4fa98dccecbae3deb7c5f647c831649
BLAKE2b-256 12f5f1b3ed4ec9e254adfe43b134e46520685cc9e96e6916f046673131dfd187

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page