Mirai Content Censor 群内容审核插件
-
Mirai Content Censor
基于 Mirai Console 和 百度AI内容审核 的自动禁言助手
本插件原命名
Mirai-AntiPorn-Plugin
设置
百度AI
使用前请根据 https://ai.baidu.com/ai-doc/ANTIPORN/Wkhu9d5iy 的步骤申请APP 获取
APP_ID
API_KEY
SECRET_KEY
在安装插件,并启动Mirai Console
后,config/content-censor
目录下会生成ContentCensor.yml
对应修改文件中APP_ID
API_KEY
SECRET_KEY
的值机器人将会在作为群主或者管理员身份的情况下工作,即群消息内容审核(文本,图片,语音)
机器人的审核规则请到 https://ai.baidu.com/censoring#/strategylist 修改策略审核内容
位于
config/ContentCensor.yml
mute
禁言时间,单位秒,默认1分钟plain
是否检查文本,默认 trueimage
是否检查图片,默认 falseaudio
是否检查语音,默认 false
避开审查
拥有权限
io.github.gnuf0rce.content-censor:no-censor
的用户将不会被检测安装
MCL 指令安装
./mcl --update-package io.github.gnuf0rce:mirai-content-censor --channel stable --type plugin
手动安装
- 运行 Mirai Console 生成
plugins
文件夹 - 从 Releases 下载
jar
并将其放入plugins
文件夹中
TODO
- 配置禁言时间
- QPS延迟
- 视频内容审核
- 转发消息内容审核
-
这个插件有人下载,却没有人回复,奇怪
-
谢谢dalao 居然更新了
-
但是丢进去之后好像根本没有被加载?
-
@sasye
我并没有设计启动提示,因为插件是被动触发的 -
配额够吗?使用在线服务不会很快用完配额吗
-
@rainchan
免费的配额其实还行,文本配额特别多 -
好用,感谢作者 :D
-
2021-12-10 18:58:48 W/anti-porn: 超时时间请设置超过 15_000 ms 2021-12-10 18:58:49 W/anti-porn: AntiPornListener handle 出错 kotlinx.serialization.MissingFieldException: Field 'log_id' is required for type with serial name 'xyz.cssxsh.baidu.aip.censor.CensorResult.Text', but it was missing at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20) at xyz.cssxsh.baidu.aip.censor.CensorResult$Text.<init>(CensorResult.kt:60) at xyz.cssxsh.baidu.aip.censor.CensorResult$Text$$serializer.deserialize(CensorResult.kt:60) at xyz.cssxsh.baidu.aip.censor.CensorResult$Text$$serializer.deserialize(CensorResult.kt:60) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:63) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:32) at kotlinx.serialization.json.Json.decodeFromString(Json.kt:100) at io.ktor.client.features.json.serializer.KotlinxSerializer.read(KotlinxSerializer.kt:37) at io.ktor.client.features.json.JsonFeature$Feature$install$2.invokeSuspend(JsonFeature.kt:161) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
-
@ssthssk
v1.1.1
尝试修复 -
This post is deleted! -
大大,出现这个错误咋办啊
2022-03-17 22:23:25 W/content-censor: Member 世间(283029512.1374216937) 消息处理失败, Text(logId=0, errorCode=110, errorMessage=Access token invalid or no longer valid, conclusion=, conclusionType=NONE, isHitMd5=false, data=[])
-
@RainChan 请问一下这个是什么情况呀,2022-03-17 22:29:33 V/Bot.1474058663: [2022湖南单招咨询群(619725060)] 有人说(2026897232) -> @全体成员,都看下,还是有没 加的抓紧加下,别错过了学校重要通知,QQ;1163883313
2022-03-17 22:29:33 W/content-censor: Member 有人说(619725060.2026897232) 消息处理失败, Text(logId=0, errorCode=110, errorMessage=Access token invalid or no longer valid, conclusion=, conclusionType=NONE, isHitMd5=false, data=[]) -
哥啊,麻烦通过以下qq频道申请,或者麻烦您看看我给您的私聊叭,孩子真的解决不了问题睡觉都没心思睡觉了
-
@风流任我
config\io.github.gnuf0rce.content-censor\ContentCensor.yml
请确认这个配置中的 key 等内容是否正确 -
@风流任我 不要at我,我不知道
-
大哥们,我昨天到今天也没干啥,这个咋突然报错了,而且我使用命令使用就报这个错,比如我放了一个斗地主的jar包,然后用console指令台设置管理员就显示这个,包括,别的插件,梗查询,后台会出现,qq群一点动静都没有C:\Users\14740\Desktop\mcl-1.2.2>.\mcl
14:19:17 [INFO] iTXTech Mirai Console Loader version 1.2.2-60c67fb
14:19:17 [INFO] https://github.com/iTXTech/mirai-console-loader
14:19:17 [INFO] This program is licensed under GNU AGPL v3
14:19:17 [INFO] Fetching Mirai Console Loader Announcement...
14:19:18 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
- 如 Unsupported image type for ExternalResource *
considering use gif/png/bmp/jpg format.
`- Tracker: https://github.com/mamoe/mirai/issues/new/choose常用资源整合
`- https://mirai.mamoe.net/topic/65314:19:18 [INFO] Verifying "org.bouncycastle:bcprov-jdk15on" v1.64
14:19:18 [INFO] Verifying "net.mamoe:mirai-console" v2.11.0-M1
14:19:18 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.11.0-M1
14:19:18 [INFO] Verifying "net.mamoe:mirai-core-all" v2.11.0-M1
14:19:18 [INFO] Verifying "org.itxtech:mcl-addon" v1.2.2
14:19:18 [INFO] Verifying "net.mamoe:chat-command" v0.5.1
14:19:18 [INFO] Verifying "net.mamoe:mirai-api-http" v2.4.0
14:19:19 [INFO] Verifying "io.github.karlatemp:luckperms" v2.10.0-dev-6+null
14:19:19 [INFO] Verifying "io.github.gnuf0rce:mirai-content-censor" v1.2.2
14:19:19 [WARN] Package "net.mamoe:chat-command" requires "net.mamoe:mirai-console" version 2.0-RC. Current version is 2.11.0-M1
2022-03-19 14:19:20 I/main: Starting mirai-console...
2022-03-19 14:19:21 I/main: Backend: version 2.11.0-M1, built on 2022-03-08 20:34:54.
2022-03-19 14:19:21 I/main: Frontend Terminal: version 2.11.0-M1, provided by Mamoe Technologies
2022-03-19 14:19:21 I/main: Welcome to visit https://mirai.mamoe.net/
2022-03-19 14:19:21 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2022-03-19 14:19:21 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
2022-03-19 14:19:21 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2022-03-19 14:19:21 I/plugin: Successfully loaded plugin Chat Command v0.5.0
2022-03-19 14:19:21 I/plugin: Successfully loaded plugin dada.douDiZhu v1.0-SNAPSHOT
__
| |) LuckPerms v2.10.0-dev-6+null
|_ | Running on Mirai Console - Mirai2022-03-19 14:19:22 I/LuckPerms: Loading configuration...
2022-03-19 14:19:22 I/LuckPerms: Loading storage provider... [H2]
2022-03-19 14:19:22 I/LuckPerms: Loading internal permission managers...
2022-03-19 14:19:22 I/LuckPerms: Performing initial data load...
2022-03-19 14:19:22 I/LuckPerms: Registering internal users....
2022-03-19 14:19:22 I/LuckPerms: Successfully enabled. (took 797ms)
2022-03-19 14:19:22 I/plugin: Successfully loaded plugin LuckPerms v2.10.0-dev-6+null
2022-03-19 14:19:22 I/plugin: Successfully loaded plugin MCL Addon v1.2.2
2022-03-19 14:19:22 I/plugin: Successfully loaded plugin net.mamoe.mirai-api-http v2.4.0
2022-03-19 14:19:22 I/plugin: Successfully loaded plugin content-censor v1.2.2
2022-03-19 14:19:22 I/main: Loaded PermissionService from plugin LuckPerms
2022-03-19 14:19:22 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2022-03-19 14:19:22 I/dada.douDiZhu: Plugin loaded
2022-03-19 14:19:22 E/dada.douDiZhu: java.lang.UnsupportedOperationException: Only allowed CLI or Direct Permit
java.lang.UnsupportedOperationException: Only allowed CLI or Direct Permit
at luckperms-2.10.0-dev-6+null.jar//io.github.karlatemp.luckperms.mirai.internal.LPPermissionService.permit(LPPermissionService.kt:365)
at luckperms-2.10.0-dev-6+null.jar//io.github.karlatemp.luckperms.mirai.internal.LPPermissionService.permit(LPPermissionService.kt:119)
at net.mamoe.mirai.console.permission.PermissionService$Companion.permit0(PermissionService.kt:195)
at douDiZhu-1.1.2 (1).jar//dada.douDiZhu.DouDiZhu.onEnable(DouDiZhu.kt:31)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:117)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:258)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:35)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:50)
at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:181)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:224)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:444)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:159)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:158)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:83)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43)
at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155)
at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105)
at org.mozilla.javascript.Context.call(Context.java:554)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522)
at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105)
at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126)
at jdk.proxy1/jdk.proxy1.$Proxy4.run(Unknown Source)
at org.itxtech.mcl.script.ScriptManager.phaseBoot(ScriptManager.java:106)
at org.itxtech.mcl.Loader.lambda$start$3(Loader.java:176)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:145)
at org.itxtech.mcl.Loader.start(Loader.java:176)
at org.itxtech.mcl.Loader.main(Loader.java:68) -
This post is deleted! -
-
噫,这是什么问题
2022-07-17 10:11:06 E/file-sync: java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError at netdisk-filesync-plugin-1.3.4.mirai2.jar//io.github.gnuf0rce.mirai.netdisk.NetDiskFileSyncPlugin.onEnable(NetDiskFileSyncPlugin.kt:32) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:131) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:278) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:35) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:50) at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:178) at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:235) at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:464) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:168) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:167) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:52) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.itxtech.mcl.Utility.bootJars(Utility.java:89) at org.itxtech.mcl.Utility.bootJars(Utility.java:79) at org.itxtech.mcl.Utility.bootMirai(Utility.java:101) at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:109) at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:148) at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:189) at org.itxtech.mcl.Loader.tryCatching(Loader.java:146) at org.itxtech.mcl.Loader.start(Loader.java:189) at org.itxtech.mcl.Loader.main(Loader.java:79) Caused by: java.lang.IllegalStateException: Cannot create instance or find a initial value for java.time.OffsetDateTime at net.mamoe.mirai.console.internal.data.ValueFromKTypeImplKt.createInstanceSmart(valueFromKTypeImpl.kt:166) at net.mamoe.mirai.console.data.PluginDataKt.valueImpl(PluginData.kt:315) at netdisk-filesync-plugin-1.3.4.mirai2.jar//io.github.gnuf0rce.mirai.netdisk.data.NetdiskUserData.<clinit>(NetdiskUserData.kt:33) ... 26 more```
-
@GALIAIS
今早写的急,忘记测试一下了
netdisk-filesync-plugin 1.3.5 修复