@orisland 合着远程访问官方给的配置页面我只能看样例……
所以先踩雷,大家用的时候不要想着本地开个端口网页设置了,直接在指令里输入/lp editor
然后打开网页改改
然后保存会给你另外一串命令
然后你就可以愉快的把这个命令……粘贴到bot的聊天栏了……
我麻了,那我还特地在本地开启官方提供的服务意义何在啊?
Orisland 发布的帖子
-
RE: LuckPerms - Mirai - 高级权限服务插件
-
RE: LuckPerms - Mirai - 高级权限服务插件
可是他内置的web有什么用呢……编辑的gui页面session是申请官网分配的,然后本地用命令来应用,我没发现可以使用本地编辑权限的方式。。
-
RE: 求教bot的Broken pipe问题出现的原因以及解决方案
@karlatemp 在 求教bot的Broken pipe问题出现的原因以及解决方案 中说:
client_loop: send disconnect: Broken pipe
啊这,我去改改ssh试试,(别骂了别骂了,Linux苦手,学了点东西就自以为是乱用的我:tired_face:
-
RE: 求教bot的Broken pipe问题出现的原因以及解决方案
@rainchan 可是似乎我在做测试的时候(idea)也会出现类似的中断问题,运行一段时间后就被结束了。:anguished:
-
求教bot的Broken pipe问题出现的原因以及解决方案
如题,每次bot运行不会超过10分钟,就会因为Broken pipe报错而自动退出。
下图为linux运行报错结果。
bot是mcl自动安装器安装的,网上查是由于socket的tcp连接被中断导致的?但是我没找到确实可行的解决办法,求教各位大佬。bot要24小时挂不能掉线的,这么一直掉就没办法了。
网络环境为阿里1h2g服务器,之前使用Windows版运行其他bot没有任何问题。
下图为系统截图。
-
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@yoonching 啊,其实我只是仿着加了一个启动调试入口啊@Nambers 上面有写那个Java框架,我只能照着架子爬:cold_sweat: ,
实际上我是个菜鸡:face_with_head_bandage: -
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@yoonching 已经用java搞了,照着其他例子写一个调试启动入口就行了,插件给的模板啥都没:face_with_rolling_eyes:
-
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@karlatemp 在 一个愚蠢的问题:到底应该如何调试和启动插件? 中说:
@orisland 在 一个愚蠢的问题:到底应该如何调试和启动插件? 中说:
@nambers 我自己改的文件,也是这个报错……
plugin是我插件随便写的名字.Exception in thread "main" java.lang.NoClassDefFoundError: net/mamoe/mirai/console/MiraiConsoleImplementation at java.base/java.lang.ClassLoader.defineClass1(Native Method)
你的
RunConsole.kt
需要放在test
源集里面, 主源集(main
) 是不包含运行时的get,目前已经基本确定是这个问题,感谢佬的解答:flushed:
-
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@colter23 在 一个愚蠢的问题:到底应该如何调试和启动插件? 中说:
dependencies 里的可以删了 上面已经使用了mirai-console插件了
问题依旧,我将错误项目直接传出来了,大佬们如果有空的话可以看看链接
为了可以实时调试已经搞了一下午了:dizzy_face: :dizzy_face:"/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java" -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=53560:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/zhaolong/IdeaProjects/SetuPlus/build/classes/java/main:/Users/zhaolong/IdeaProjects/SetuPlus/build/classes/kotlin/main:/Users/zhaolong/IdeaProjects/SetuPlus/build/resources/main:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/net.mamoe/mirai-console-terminal/2.6.4/834ce5943058277e8cf6ca075fec1d62eac49edb/mirai-console-terminal-2.6.4.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.4.30/aeecfab2e6acbcb80fc6628e8882c98cbbd819cf/kotlin-stdlib-jdk8-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/net.mamoe/mirai-core-api-jvm/2.6.4/9bbe022d06623bc8b14d0a883e992db763b83cac/mirai-core-api-jvm-2.6.4.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.30/cd81ed90fd79e43f587bd384c2bc6d1aed0bfe31/kotlin-stdlib-jdk7-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.30/d10d1e10f47006ee08162dde039e38ac487de4ac/kotlin-stdlib-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-jdk8/1.4.2/5fade60e503a55fc9d3af41b7190de1a84b14e3f/kotlinx-coroutines-jdk8-1.4.2.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-okhttp/1.5.1/f3ade3edfeb40c0c531bd31706ed1993e7d5d85f/ktor-client-okhttp-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.4.30/a9116fbe28a0514671787df95133f28e65fdac25/kotlin-reflect-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-serialization/1.4.30/96dbda4bf53b86a548421775d886fdb42ddcb37c/kotlin-serialization-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-io-jvm/0.1.16/b2bcf3815337e34b598b9e9a579fe5ec0f8a3ab4/kotlinx-coroutines-io-jvm-0.1.16.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-io-jvm/0.1.16/121c7a446719b21f8f1275134d6073aa22b23121/kotlinx-io-jvm-0.1.16.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.30/bb9a3173350f55732416ee27956ea8f9b81f4dbb/kotlin-stdlib-common-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/4.6.0/1885ec944e0a74e78359756e88ce656fd5a596d5/okhttp-4.6.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.30/b5a4b6d16ab13e34a88fae84c35cd5d68cac922c/slf4j-api-1.7.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-core-jvm/1.5.1/d232964dba7318a8aa131b498f58482303038ccd/ktor-client-core-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-network-jvm/1.5.1/f24b541c0a2f5ed4b860d27beb47e7729a5cfc62/ktor-network-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.4.30/a66fa6006e99b46025bc21653c2bf89316053fb5/kotlin-gradle-plugin-api-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-json-jvm/1.1.0/86c26030512eb057e02c9bfcfdfd9e2fbb82201/kotlinx-serialization-json-jvm-1.1.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-core-jvm/1.1.0/6a6d0b8e8a44c48e206e435d279b1773832f4f1b/kotlinx-serialization-core-jvm-1.1.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-io/0.1.16/a148ebbf458bb8c787ded007a62a6f53324358e1/kotlinx-coroutines-io-0.1.16.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-common/0.14.1/323b5e62491623e6670ebe593af2ebfbf46cb210/atomicfu-common-0.14.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-io/0.1.16/c2bb49e5fa65eed71e1ea0dc12e78619296a01fd/kotlinx-io-0.1.16.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.4.2/4b9c6b2de7cabfb2c9ad7a5c709b1ddb7bbfd2ad/kotlinx-coroutines-core-jvm-1.4.2.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/2.6.0/f06923d428f3c8e6f571043ec29a45d0cd9d2bf/okio-jvm-2.6.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-http-cio-jvm/1.5.1/b41829b9e7e354c9a6e55ee888c7d83b53a51984/ktor-http-cio-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-http-jvm/1.5.1/8347ad9b7ac34137f162427e23fa4145e96f8262/ktor-http-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-jvm/1.5.1/9763b731d7017c5258a65a9d6f871a7a91ad5a34/ktor-utils-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-io-jvm/1.5.1/a6170780ba77e2cd7dcd94e63e4649c98516292d/ktor-io-jvm-1.5.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/net.mamoe/mirai-core-jvm/2.6.4/c96ed94bc608473bfecd3a173f223b73e409f482/mirai-core-jvm-2.6.4.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jline/jline/3.15.0/6c8d38639ac26de5ccb5bed947ce2fd40b7e2269/jline-3.15.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.fusesource.jansi/jansi/1.18/d9205bbcd4b5f9cd1effe752d18f73bd942d783f/jansi-1.18.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test-junit5/1.4.30/4ec1973ada0eabec38e9679cb0568423ed1c3790/kotlin-test-junit5-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.4.2/4d10922ce4d9c4e22cef8ff5386cb273b9f12281/junit-jupiter-engine-5.4.2.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.4.2/665d1c0daecb26c6210c872768000b417e7e52b6/junit-jupiter-api-5.4.2.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.64/1467dac1b787b5ad2a18201c0c281df69882259e/bcprov-jdk15on-1.64.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/19.0.0/efbff6752f67a7c9de3e4251c086a88e23591dfd/annotations-19.0.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/net.mamoe/mirai-core-utils-jvm/2.6.4/67f768fd99efdacbc1d24592283801db43893af/mirai-core-utils-jvm-2.6.4.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-protobuf-jvm/1.1.0/a2c675697ad328d1a5293660dd9e1112e7a7ef17/kotlinx-serialization-protobuf-jvm-1.1.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test/1.4.30/a8c0e21fda17f61a6de193e16dd414683cf9dcb0/kotlin-test-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test-annotations-common/1.4.30/e77a76b23fc3007baf57a9d3354fdd318fe1fa88/kotlin-test-annotations-common-1.4.30.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.4.2/52b70561f65bb397b054876f2d8c6f30b06c3581/junit-platform-engine-1.4.2.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.0.0/3ef5276905e36f4d8055fe3cb0bdcc7503ffc85d/apiguardian-api-1.0.0.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.4.2/37993dc807ca253aa347be8968a0ae7b70642dbc/junit-platform-commons-1.4.2.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.1.1/efd9f971e91074491ea55b19f67b13470cf4fcdd/opentest4j-1.1.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/net.mamoe/kotlin-jvm-blocking-bridge-jvm/1.10.3/8291d6bffb195cba40873751e57cd38c88b3c392/kotlin-jvm-blocking-bridge-jvm-1.10.3.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-jvm/0.15.1/6874562ba1fc4e1448a42d0c5286b558e409aa68/atomicfu-jvm-0.15.1.jar:/Users/zhaolong/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test-common/1.4.30/823ed87441680d1334a1f0d23781c0089e16c0a6/kotlin-test-common-1.4.30.jar RunConsoleKt Exception in thread "main" java.lang.NoClassDefFoundError: net/mamoe/mirai/console/MiraiConsoleImplementation at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:152) at RunConsoleKt.main(RunConsole.kt:10) at RunConsoleKt$$$main.invoke(Unknown Source) at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:205) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115) at kotlin.coroutines.jvm.internal.RunSuspendKt.runSuspend(RunSuspend.kt:19) at RunConsoleKt.main(RunConsole.kt) Caused by: java.lang.ClassNotFoundException: net.mamoe.mirai.console.MiraiConsoleImplementation at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 17 more Process finished with exit code 1
-
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@nambers
是不是dependencies出问题了=。=我感觉好像我动过这部分:face_with_head_bandage:plugins { val kotlinVersion = "1.4.30" kotlin("jvm") version kotlinVersion kotlin("plugin.serialization") version kotlinVersion id("net.mamoe.mirai-console") version "2.6.4" } group = "com.orisland" version = "1.0-SNAPSHOT" repositories { maven("https://maven.aliyun.com/repository/public") mavenCentral() } dependencies { // 开发时使用 mirai-core-api,运行时提供 mirai-core api("net.mamoe:mirai-core-api:2.6.4") api("net.mamoe:mirai-console-terminal:2.6.4") runtimeOnly("net.mamoe:mirai-core:2.6.4") // 可以简单地只添加 api("net.mamoe:mirai-core:2.6.1") }
-
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@colter23 应该不是这个问题吧,而且不全我也不知道怎么补,我创建了两次,都不行:drooling_face: 麻了,找不出原因,插件也没法写:dizzy_face:
-
RE: 一个愚蠢的问题:到底应该如何调试和启动插件?
@nambers
是的,这是idea的mirai插件自动创建的,除了插件基本信息外我没有做任何修改。package com.orisland; import jdk.nashorn.internal.ir.Terminal; import net.mamoe.mirai.Bot; import net.mamoe.mirai.BotFactory; import net.mamoe.mirai.console.MiraiConsole; import net.mamoe.mirai.console.plugin.jvm.JavaPlugin; import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescriptionBuilder; public final class Plugin extends JavaPlugin { public static final Plugin INSTANCE = new Plugin(); private Plugin() { super(new JvmPluginDescriptionBuilder("com.orisland.plugin", "1.0-SNAPSHOT") .name("Orisland's plugin") .info("what???") .author("orisland") .build()); } @Override public void onEnable() { getLogger().info("Plugin loaded!"); } }