Skip to main content

Message Blocker

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-blocker

✨ NoneBot Plugin Blocker ✨

license pypi python

📖 介绍

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

💿 安装

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

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

plugins = ["nonebot-plugin-blocker"]

⚙️ 配置

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

#本配置项不是必填配置项
blocker_trigger={"%BotQQ号%":{"on":"%开启命令%","off":"%关闭命令%"}}

其他配置项

插件的回复配置文件位于 data/blocker/blocker_reply.json

    {
        "reply_on":{
            "type":"text"
            "data":{
                "text":"在本群开启"
            }
        },
        "reply_off":{
            "type":"text"
            "data":{
                "text":"在本群关闭"
            }
        }
    }

data/blocker/blocklist.json 里是已经设置关闭Bot的群号,可以在关闭nonebot之后手动编辑

💬 指令

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

.bot on在该群开启bot

.bot off在该群关闭bot

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

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.2.0.tar.gz (4.1 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_blocker-0.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-blocker-0.2.0.tar.gz.

File metadata

  • Download URL: nonebot-plugin-blocker-0.2.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.8.0 CPython/3.10.6

File hashes

Hashes for nonebot-plugin-blocker-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c5363a699c5cd4c3011168dbdf846d928a60df464626ee74fd31c3d743c70926
MD5 6bd49d453f905dd0c003b09bf1f7fe0b
BLAKE2b-256 c6f2b4d931159706f2b903a763298fb3d6e91f2b6a9c0c8624964127bcfdb7e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_blocker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51503553f571c7a19350e5712b6f8551e8a53e723927620c13dc340fb5b2bdef
MD5 8ae0f67d6e1e06aeb2d38d6a4a1b8bde
BLAKE2b-256 ebeaee581148533413f718c36e5c0db276701336e1f27955a491deedf25001e6

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