Skip to main content

Message Blocker

Project description

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=""
#Blocker插件的配置存放位置,留空则为默认./data/blocker
blocker_data_path=""

其他配置项

插件的回复配置文件位于 data/blocker/config.json 里,不建议手动更改

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

💬 指令

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

.bot on在该群开启bot

.bot off在该群关闭bot

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

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

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_blocker-0.4.8.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_blocker-0.4.8-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_blocker-0.4.8.tar.gz.

File metadata

  • Download URL: nonebot_plugin_blocker-0.4.8.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.13.2 CPython/3.10.12 Linux/6.5.0-1017-azure

File hashes

Hashes for nonebot_plugin_blocker-0.4.8.tar.gz
Algorithm Hash digest
SHA256 7cdd08e73bab04564c1cab9f690ebcdf0e95bb7431028200f684fc917c362b47
MD5 d53985b6941c4d0b6c27ff8f63f9d378
BLAKE2b-256 3ba0936e2187e0ffc0cd38928b33e4c572f88aa277e5cfc7f47be4349b148410

See more details on using hashes here.

File details

Details for the file nonebot_plugin_blocker-0.4.8-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_blocker-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ce371b08a773e8fd6e4acfb35a6e074e96b6c3e01391e0f62f3ada6384f3f4f4
MD5 b21a29881d4ecb1d46abf1f74286dc56
BLAKE2b-256 496dcfd4fbc7d5133361374318b5c899830f5ed13c629f014189f5fb6b2b3948

See more details on using hashes here.

Supported by

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