Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-antiinsult

✨ NoneBot 反嘴臭插件 ✨

license pypi python nonebot onebot

📖 介绍

本插件为被动插件

检测到有用户 @机器人 并嘴臭时将其临时屏蔽(bot重启后失效)
当bot为群管理时会请对方喝昏睡红茶(禁言)

  • 超级用户不受临时屏蔽影响 但是会被昏睡红茶影响
  • 当bot的群权限比超级用户高的时候, 超级用户也有机会品尝昏睡红茶
  • 被bot灌了昏睡红茶的用户不会进临时黑名单
  • 开启 对线模式 后不会被bot灌昏睡红茶和临时拉黑 (因为要对线)

💿 安装

nb-cli安装, 包管理器安装 二选一

使用 nb-cli 安装

在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装

nb plugin install nonebot-plugin-antiinsult
使用包管理器安装

在 nonebot2 项目的插件目录下, 打开命令行,

根据你使用的包管理器, 输入相应的安装命令

pip
pip install nonebot-plugin-antiinsult
pdm
pdm add nonebot-plugin-antiinsult
poetry
poetry add nonebot-plugin-antiinsult
conda
conda install nonebot-plugin-antiinsult

打开 bot项目下的 pyproject.toml 文件,

在其 plugins 里加入 nonebot_plugin_antiinsult

plugins = ["nonebot_plugin_antiinsult"]

🎉 使用

在Bot目录下的 .env 文件内可添加以下变量以设置禁言时长:

ANTI_INSULT_BAN_TIME=720

单位为分钟, 默认值720分钟(12小时)

指令表

指令 权限 需要@ 范围 说明
^(添加|删除)屏蔽词 xxx 主人 否 私聊 | 群聊 可输入多个,
用空格隔开
解除屏蔽 qq 主人 否 私聊 | 群聊
查看临时黑名单 主人 否 私聊 | 群聊
^(禁用|启用)飞(妈|马|🐴|🐎)令 主人 否 私聊 | 群聊 开启/关闭对线模式

P.S. 解除屏蔽 可以解除临时屏蔽, 也可以解除禁言(当然, 需要bot为群管理).

你说从聊天界面查看屏蔽词库? 噢, 我亲爱的老伙计, 你怕是疯了!

⚠️ 注意事项

本插件目前仅支持 nonebot2 + onebot.v11 的使用方式, 一切非此二者结合的使用方式造成的问题请自行探索解决, 或者使用其他插件

Metadata

Release files for nonebot-plugin-antiinsult 0.7.1

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-antiinsult 0.7.1
File Size Uploaded Provenance
nonebot_plugin_antiinsult-0.7.1.tar.gz 16.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-antiinsult 0.7.1
File Interpreter ABI Platform
nonebot_plugin_antiinsult-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.1 kB

Release files / nonebot_plugin_antiinsult-0.7.1.tar.gz

Download URL nonebot_plugin_antiinsult-0.7.1.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e1aa359aa945b01d16755b4a9281087e4f42328fd7dc6974cdf63686fa6959f1
BLAKE2b-256 checksum
How to use checksums
da2b18c8ac3bfb92d362f3759fddd24f144d6f3c406dcebc8a3b2715cdf5f2fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / nonebot_plugin_antiinsult-0.7.1-py3-none-any.whl

Download URL nonebot_plugin_antiinsult-0.7.1-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7562ca642a1e08fb1d0507e3178501f4d87cb790a0b1b5c2935d65455850fd95
BLAKE2b-256 checksum
How to use checksums
bdc6d527b84502f7fad4f68452fa6cd1995203034a36f48392c7a90a3305cabc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Security for nonebot-plugin-antiinsult 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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