机器人管理小工具 Debug Helper, 新增功能热重载插件
-
Debug Helper
基于 Mirai Console 的 调试小工具 插件
使用前应该查阅的相关文档或项目
1.2.2
起
本插件中机器人管理的相关功能已经拆分至 mirai-administrator
请注意相关权限的重新处理。指令
注意: 使用前请确保可以 在聊天环境执行指令
<...>
中的是指令名
[...]
表示参数,当[...]
后面带?
时表示参数可选
{...}
表示连续的多个参数本插件指令权限ID 格式为
io.gnuf0rce.mirai.plugin.debug-helper:command.*
,*
是指令的第一指令名
例如/device
的权限ID为io.gnuf0rce.mirai.plugin.debug-helper:command.device
DebugCommands
指令 描述 /<at-all> [text] [group]?
向指定群发送 AtAll /<gc>
主动触发 JVM GC /<random-image> [contact]?
随机发送一张图片 /<forward> [contact] [title]?
转发消息,句号结束 /<fork> [contact] {codes}
从mirai-code构造消息 /<rich> [content]
构造卡片消息 /<device>
查看 Bot 设备信息 /<backup-data>
备份数据 /<reload> [id]
热重载插件 /<system-property> [key] [value]
设置 system-property DebugSetting
- auto_download_message 自动保存特殊消息内容,比如闪照
- random_image_api 随机图片API by https://rainchan.win/projects/pximg
修改协议内容
这是 1.3.5 新增的功能
在data/io.github.gnuf0rce.debug-helper/
下新建文本文件ANDROID_PHONE.txt
(可根据需要修改的协议名更改文件名)填入例如 (注意这是 ANDROID_PHONE 的协议内容,如果需要其他协议,请自行解决)
com.tencent.mobileqq 537066978 0.9.15.9425 6.0.0.2463 150470524 66560 16724722 A6 B7 45 BF 24 A2 C2 77 52 77 16 F6 F3 6E B6 8D 1640921786 16
安装
MCL 指令安装
./mcl --update-package io.github.gnuf0rce:debug-helper --channel stable --type plugin
手动安装
- 运行 Mirai Console 生成
plugins
文件夹 - 从 Releases 下载
jar
并将其放入plugins
文件夹中
-
好家伙,你就是甘地本人。
-
用不了啊
-
第一眼大喇叭功能?第二眼原来是上线通知。。。
-
@sirayuki 在 机器人管理小工具 Debug-helper 中说:
第一眼大喇叭功能?第二眼原来是上线通知。。。
草 还真是大喇叭 不过撤回
出现错误 java.util.NoSuchElementException: Collection contains no element matching the predicate. -
@sirayuki
撤回,目前需要回复消息触发 -
@cssxsh 看一下issue呗~
-
此回复已被删除! -
此回复已被删除! -
@smallbug
仔细看文档 -
此回复已被删除! -
@smallbug
/perm add g* xyz.cssxsh.mirai.plugin.debug-helper:online.exclude
-
一个详细的错误日志,如果看到了希望可以抽一小点时间回复一下这个萌新,谢谢啦!
21:19:17 [INFO] Verifying "net.mamoe:mirai-console" v2.8.0-M1 21:19:17 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.8.0-M1 21:19:17 [INFO] Verifying "net.mamoe:mirai-core-all" v2.8.0-M1 21:19:18 [INFO] Verifying "org.itxtech:mcl-addon" v1.2.2 2021-10-15 21:19:20 I/main: Starting mirai-console... 2021-10-15 21:19:21 I/main: Backend: version 2.8.0-M1, built on 2021-09-22 17:49:01. 2021-10-15 21:19:21 I/main: Frontend Terminal: version 2.8.0-M1, provided by Mamoe Technologies 2021-10-15 21:19:21 I/main: Welcome to visit https://mirai.mamoe.net/ 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin AntiStu v0.1.1 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin bilibili-helper v1.1.8 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin Chat Command v0.5.0 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin debug-helper v1.0.9 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin MCL Addon v1.2.2 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin net.mamoe.mirai-api-http v2.3.1 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin mirai-console-lolicon v4.1.1 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin 点歌插件 v1.1.3 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin Reporter v1.2.10 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin PluginVoodoo v1.5.0 2021-10-15 21:19:21 I/plugin: Successfully loaded plugin dada.reversedTictactoe v1.0-SNAPSHOT 2021-10-15 21:19:21 I/main: Prepared built-in commands: autoLogin, help, login, permission, status, stop 2021-10-15 21:19:21 I/AntiStu: 加载数据.... 2021-10-15 21:19:21 I/AntiStu: 初始化运行环境.... 2021-10-15 21:19:22 I/AntiStu: 初始化成功 Starting ChromeDriver 94.0.4606.41 (333e85df3c9b656b518b5f1add5ff246365b6c24-refs/branch-heads/4606@{#845}) on port 9165 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. 2021-10-15 21:19:25 E/debug-helper: java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError at io.gnuf0rce.mirai.plugin.DebugHelperPlugin.onEnable(DebugHelperPlugin.kt:22) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:113) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:122) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:36) at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:129) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:172) at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:208) at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:276) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:152) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:151) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) 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:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) 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) Caused by: kotlinx.serialization.SerializationException: Serializer for class 'RequestEventData' is not found. Mark the class as @Serializable or provide the serializer explicitly. at kotlinx.serialization.internal.Platform_commonKt.serializerNotRegistered(Platform.common.kt:91) at kotlinx.serialization.SerializersKt__SerializersKt.serializer(Serializers.kt:155) at kotlinx.serialization.SerializersKt.serializer(Unknown Source) at net.mamoe.mirai.console.internal.data.SerializerHelperKt.serializerMirai$serializerByKTypeImpl(serializerHelper.kt:51) at net.mamoe.mirai.console.internal.data.SerializerHelperKt.serializerMirai(serializerHelper.kt:87) at net.mamoe.mirai.console.internal.data.SerializerHelperKt.serializerMirai$serializerByKTypeImpl(serializerHelper.kt:54) at net.mamoe.mirai.console.internal.data.SerializerHelperKt.serializerMirai(serializerHelper.kt:87) at net.mamoe.mirai.console.internal.data.SerializerHelperKt.serializerMirai$serializerByKTypeImpl(serializerHelper.kt:54) at net.mamoe.mirai.console.internal.data.SerializerHelperKt.serializerMirai(serializerHelper.kt:87) at net.mamoe.mirai.console.internal.data.ValueFromKTypeImplKt.valueFromKTypeImpl(valueFromKTypeImpl.kt:74) at net.mamoe.mirai.console.data.PluginDataKt.valueFromKType(PluginData.kt:247) at net.mamoe.mirai.console.data.PluginDataKt.valueImpl(PluginData.kt:230) at io.gnuf0rce.mirai.plugin.data.DebugRequestEventData.<clinit>(DebugRequestEventData.kt:88) ... 42 more 2021-10-15 21:19:25 I/MCL Addon: iTXTech MCL Version: 1.2.2-60c67fb 2021-10-15 21:19:26 W/net.mamoe.mirai-api-http: USING INITIAL KEY, please edit the key 2021-10-15 21:19:26 I/Mirai HTTP API: ******************************************************** SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 2021-10-15 21:19:27 I/http adapter: >>> [http adapter] is listening at http://localhost:8080 2021-10-15 21:19:27 I/Mirai HTTP API: Http api server is running with verifyKey: INITKEYLRIauV01 2021-10-15 21:19:27 I/Mirai HTTP API: adaptors: [http] 2021-10-15 21:19:27 I/Mirai HTTP API: ******************************************************** 2021-10-15 21:19:28 I/mirai-console-lolicon: Plugin mirai-console-lolicon loaded ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv - -enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e -- enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx -- enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf -- enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-li bglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --ena ble-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libm ysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 2021-10-15 21:19:28 I/点歌插件: 当前配置项:宽域AMR:true AMR自动大小:false 2021-10-15 21:19:28 I/点歌插件: 插件加载完毕! 2021-10-15 21:19:28 I/PluginVoodoo: VoodooPlugin loaded 2021-10-15 21:19:28 I/dada.reversedTictactoe: Plugin loaded 2021-10-15 21:19:28 I/main: 11 plugin(s) enabled. 2021-10-15 21:19:28 I/main: mirai-console started successfully. 2021-10-15 21:19:29 I/bilibili-helper: driver agent {BiliApp=false, CMDC=false, MicroMessenger=true, QQLive=false, Safari=false, Youku=false , android=false, baidu=false, chrome=false, iPad=true, iPhone=false, ios=true, iqiyi=false, mbaidu=false, mobile=true, mqq=false, qq=false, uc=false, webApp=false, weibo=false, windowsphone=false}
-
-
@cssxsh 哈哈忘记发布好可爱
-
希望大佬完善一下功能,诸如修改群公告,入群欢迎,飞机票之类的
-
@白嫖怪林先生
这只是个debug工具 -
我发现这个撤回指令,上面的消息倒是没撤回,他把我的指令给撤回了
-
@白嫖怪林先生
消息检索出了一些问题 -
求问能不能通过机器人的管理员同意入群申请啊,我尝试过使用/contact-request这条指令,提示我找不到事件,而后申请人的申请也被拒绝了