Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-blocker

✨ NoneBot Plugin Blocker ✨

license pypi python pypi download

📖 介绍

这是一个 nonebot2 插件项目,用于分群配置机器人的开启关闭

插件提供了一个简单的WebUI来让你配置Bot的开关指令以及对指令做出的回复。

💿 安装

使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-blocker

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_blocker"]

⚙️ 配置

常规配置项,位于.env文件里

#WebUI的登录凭证,不设置即不进行验证
BLOCKER_WEBUI_USERNAME=""
BLOCKER_WEBUI_PASSWORD=""
# 已弃用,使用nonebot_plugin_localstore存储
blocker_data_path=""

其他配置项

插件的回复配置文件位于 {LOCALSTORE_DATA_DIR}/nonebot_plugin_blocker/config.json 里,不建议手动更改

{LOCALSTORE_DATA_DIR}/nonebot_plugin_blocker/blocklist.json 里是已经加入名单的群号,可以在关闭nonebot之后手动编辑

💬 指令

指令只有管理员,群主以及Bot的SUPERUSER能够使用

.bot on在该群开启bot

.bot off在该群关闭bot

在上述指令后at特定bot将关闭使用了本插件的特定Bot,不会影响使用本插件的其他Bot

如果你在WebUI设置了指令|回复那么指令|回复将会是你设置的文本

Release files for nonebot-plugin-blocker 0.4.12

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-blocker 0.4.12
File Size Uploaded
nonebot_plugin_blocker-0.4.12.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-blocker 0.4.12
File Interpreter ABI Platform
nonebot_plugin_blocker-0.4.12-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / nonebot_plugin_blocker-0.4.12.tar.gz

Download URL nonebot_plugin_blocker-0.4.12.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f52879b60e850ea7983577e4904be28c17c544ef4ba73f6245c91978bcbd4187
BLAKE2b-256 checksum
How to use checksums
cd41eb48f18dd9fe7d826fe86b2b094586a8d0202744856d7309e778394d95fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nonebot_plugin_blocker-0.4.12-py3-none-any.whl

Download URL nonebot_plugin_blocker-0.4.12-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c51354e4311f226c8fa74e5484ccbd02476765db331bc79817bf84909db19cf
BLAKE2b-256 checksum
How to use checksums
dc6a1ff7881f8878e5321035a5d20bd750374cd6a7f7c8d6c62e5bdc6040e59f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.4.12 This release

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

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