Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-text-ban

✨ 违禁词撤回 ✨

什么?又有司马仔发tx的广告触发词了?快用它ban掉吧~

📖 介绍

一个基于Lagrange.OneBot和NoneBot的违禁词撤回插件

已实现的功能

  • 违禁词撤回
  • 误判申诉
  • 图片检测
  • 谐音检测
  • 自动踢出
  • 撤回内容自动转发

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-text-ban
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-text-ban
pdm
pdm add nonebot-plugin-text-ban
poetry
poetry add nonebot-plugin-text-ban
conda
conda install nonebot-plugin-txt_ban

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

plugins = ["nonebot_plugin_text_ban"]

⚙️ 配置

配置项 必填 默认值 说明 数据类型
strict 否 False 严格模式(一个一个字检测,例如你的违禁词是 "你好",如果开了这项,那么只要消息中包含“你”和“好”,那么就会撤回) bool
ocr 否 False 检测图片中的违禁词(精度稍低) bool
pinyin 否 False 检测谐音字 bool
kick 否 False 是否自动踢出(群员触发3次违禁词后自动踢出 bool

🎉 使用

指令表

指令 权限 需要@ 范围 说明
help 管理/群主/主人 否 all 插件帮助(需要加上命令头)
add [text] [type] 管理/群主/主人 是 all 添加违禁词,text代表违禁词,type代表模式,目前可选1(精确),2(模糊)
del [text] [type] 管理/群主/主人 是 all 删除违禁词,text代表违禁词,type代表模式,目前可选1(精确),2(模糊)
add_group [group_id?] 管理/群主/主人 否 all 开启本插件,group_id代表群号,不填则默认为当前群(如果是私聊的话得加上group_id)
del_group [group_id?] 管理/群主/主人 否 all 关闭本插件,group_id代表群号,不填则默认为当前群(如果是私聊的话得加上group_id)
appeal all 否 私聊 当机器人误判违禁词时,可发送此指令以申诉
operate [同意/拒绝] [user_id] [ban?] 管理/群主/主人 是 私聊 同意/拒绝申诉,ban代表是否踢出,目前可选t(踢出),tm(踢出且不接受此人申请)不填则不踢出

Metadata

Release files for nonebot-plugin-text-ban 0.1.6

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-text-ban 0.1.6
File Size Uploaded Provenance Actions
nonebot_plugin_text_ban-0.1.6.tar.gz 8.3 kB Without provenance Details for nonebot_plugin_text_ban-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-text-ban 0.1.6
File Interpreter ABI Platform Actions
nonebot_plugin_text_ban-0.1.6-py3-none-any.whl Python 3 none any Details for nonebot_plugin_text_ban-0.1.6-py3-none-any.whl

Total release size: 15.8 kB

Release files / nonebot_plugin_text_ban-0.1.6.tar.gz

Download URL nonebot_plugin_text_ban-0.1.6.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d0450723f0e4142cad8ce8919cf2834a04a7cf8240773a7e5457e1430394f07a
BLAKE2b-256 checksum
How to use checksums
8e254de562fa1a7421534d73220394e93c6f03e7dda040febc511379d992f588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / nonebot_plugin_text_ban-0.1.6-py3-none-any.whl

Download URL nonebot_plugin_text_ban-0.1.6-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50612131527092435e470ddbc50debfd55fecc804cda12568eff819d8c2bd031
BLAKE2b-256 checksum
How to use checksums
b94b4bae742fecacaf139a73ae3aa1038eaf789779951ca504a7202865329228
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for nonebot-plugin-text-ban 0.1.6

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