Skip to main content

坏词撤回 0.4.2

基于ayaka开发的 坏词撤回 插件

任何问题请发issue

  • 自动撤回包含屏蔽词的消息
  • 只适用于群聊
  • 管理员无法撤回其他管理员和群主的发言

安装插件

nb plugin install nonebot-plugin-ayaka-prevent-bad-words

配置

文件位置:data/ayaka/坏词撤回.json(该文件在第一次启动时会自动生成)

word_packages

敏感词列表,可设置若干个词包,供各群组独立使用或交叉使用

{
	"word_packages":[
		{
			"name": "违禁词包1",
			"words":  ["词1","词2"],
			"groups": [123455667, 102882912]
		},
		{
			"name": "违禁词包2",
			"words":  ["词3"],
			"groups": [102882912]
		}
	]
}

每个词包的name属性可以为空

特殊情况:若设置群号为0,则该词包会对所有群聊生效

{
	"word_packages":[
		{
			"name": "违禁词包3",
			"words":  ["词5","词6"],
			"groups": [0]
		}
	]
}

delay

延迟n秒后撤回,默认为0

可能会因为网络延迟而不准确

powerful

检测力度,默认为0

powerful 效果
-1 发出提示语,不撤回
0 只有坏词完全匹配时,才会撤回
1 即使坏词中夹杂了标点符号,也会撤回

tip

撤回消息后发送提示语,默认为 请谨言慎行

若设置为空,则撤回时不发送提示语

exclude_cq

排除一些cq码,解决#2中的问题

默认值为["at", "image", "json", "xml"],排除该4个类型cq码

设置为[""],排除所有cq码

设置为[],所有cq码均不排除

重启bot

注意:修改配置后,需要重启bot才能生效

Metadata

Release files for nonebot-plugin-ayaka-prevent-bad-words 0.4.2

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-ayaka-prevent-bad-words 0.4.2
File Size Uploaded
nonebot_plugin_ayaka_prevent_bad_words-0.4.2.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-ayaka-prevent-bad-words 0.4.2
File Interpreter ABI Platform
nonebot_plugin_ayaka_prevent_bad_words-0.4.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 8.0 kB

Release files / nonebot_plugin_ayaka_prevent_bad_words-0.4.2.tar.gz

Download URL nonebot_plugin_ayaka_prevent_bad_words-0.4.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8138e01fcb3907bf2cd887e3bf4b66c6a376386314878d991416015f90576b43
BLAKE2b-256 checksum
How to use checksums
98a8fc90df793b278d3454dacb265e0dd40059ecb313f54c75ab98ecbb01521d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.10.9 Windows/10

Release files / nonebot_plugin_ayaka_prevent_bad_words-0.4.2-py2.py3-none-any.whl

Download URL nonebot_plugin_ayaka_prevent_bad_words-0.4.2-py2.py3-none-any.whl
Size 4.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
629e62aa26a129caba21f89a2d10e8902ea8030e09a151c57f694aecb9bfabbc
BLAKE2b-256 checksum
How to use checksums
f47b59857e32fb1e5883f7d8919a8e55f3289b41f096505c740841ef64f21cdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.10.9 Windows/10

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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