Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-text-ban

✨ 违禁词撤回 ✨

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

📖 介绍

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

[!WARNING] 该插件只能用Lagrange.OneBot作为协议端,其他协议端暂不支持

已实现的功能

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

💿 安装

使用 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(踢出且不接受此人申请)不填则不踢出

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_text_ban-0.1.6.tar.gz (8.3 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_text_ban-0.1.6-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_text_ban-0.1.6.tar.gz.

File metadata

  • Download URL: nonebot_plugin_text_ban-0.1.6.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for nonebot_plugin_text_ban-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d0450723f0e4142cad8ce8919cf2834a04a7cf8240773a7e5457e1430394f07a
MD5 3889af5ef953168f9bd92616e05aecb5
BLAKE2b-256 8e254de562fa1a7421534d73220394e93c6f03e7dda040febc511379d992f588

See more details on using hashes here.

File details

Details for the file nonebot_plugin_text_ban-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_text_ban-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 50612131527092435e470ddbc50debfd55fecc804cda12568eff819d8c2bd031
MD5 04d51fb097f65c5fcd3c2bc9656c0590
BLAKE2b-256 b94b4bae742fecacaf139a73ae3aa1038eaf789779951ca504a7202865329228

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page