Skip to main content

Default template for PDM package

Project description

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

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_text_ban-0.1.2.tar.gz (6.6 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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_text_ban-0.1.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for nonebot_plugin_text_ban-0.1.2.tar.gz
Algorithm Hash digest
SHA256 98e1f266a067b232caf768fd157a0413835fb7fedc426d1310af13f4887e762b
MD5 211604596f13385ad813bf57e879583e
BLAKE2b-256 79b4db056e357a3820a40f043258d06e8a643e0c17f65ddbdf50d18d42b9786b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_text_ban-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fcc1f2a5b771f7fb7fb1d1baf2124979e78bc5e31dbf032415df43e1fc3061e
MD5 ad5ba148c57e66814891ff7fcc6dbb35
BLAKE2b-256 b9eda2f9433e3bcb826114e2181880508d9e26560d0e96791ca8f2072ca3d980

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