MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    Kookie——一个可爱的机器人插件

    插件发布
    jvm java plugin
    12
    70
    6704
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SiinaYuki
      SiinaYuki last edited by

      楼主大大您好!可不可以考虑一个群黑名单的功能,因为要添加的群实在太多了,能不能默认全部开放然后自己禁用不需要的群呢?期待您的回复,谢谢!

      GeneralK1ng 2 Replies Last reply Reply Quote 0
      • GeneralK1ng
        GeneralK1ng @SiinaYuki last edited by

        @SiinaYuki 在 Kookie——一个可爱的机器人插件 中说:

        楼主大大您好!可不可以考虑一个群黑名单的功能,因为要添加的群实在太多了,能不能默认全部开放然后自己禁用不需要的群呢?期待您的回复,谢谢!

        好的好的,等我周末吧

        1 Reply Last reply Reply Quote 0
        • GeneralK1ng
          GeneralK1ng @warmsone last edited by

          @warmsone 检查服务器是否支持utf-8,或者尝试jvm以utf8编码启动,我记得启动项是export JAVA_OPTIONS=-Dfile.encoding=UTF-8

          1 Reply Last reply Reply Quote 0
          • M
            manshuo @820040531 last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • 凉开水233
              凉开水233 last edited by 凉开水233

              重复弹出缓存异常,以及使用答案之书和词云会乱码QQ_1721319931333.png
              QQ_1721320001558.png

              GeneralK1ng 2 Replies Last reply Reply Quote 0
              • GeneralK1ng
                GeneralK1ng @凉开水233 last edited by

                @凉开水233

                • 尝试jvm以utf8编码启动,我记得启动项是export JAVA_OPTIONS=-Dfile.encoding=UTF-8,
                • 缓存异常应该是 ./kookies/data/messageCache/群号-id/msg/中的发送人的json在分词刚启动的时候发生了脏读,因为分词是冷启动,此时如果遭遇并发会导致一致性问题,尝试删除msg文件夹,或者删除触发此异常的人的json文件
                1 Reply Last reply Reply Quote 0
                • GeneralK1ng
                  GeneralK1ng @fufuzhou last edited by

                  @fufuzhou 异常抛出是必要的,如果直接返回false则整个用户态无感,不便于排查错误

                  fufuzhou 1 Reply Last reply Reply Quote 0
                  • GeneralK1ng
                    GeneralK1ng @凉开水233 last edited by

                    @凉开水233 请问后续是否还有类似问题?

                    1 Reply Last reply Reply Quote 0
                    • GeneralK1ng
                      GeneralK1ng @SiinaYuki last edited by

                      @SiinaYuki 在 Kookie——一个可爱的机器人插件 中说:

                      楼主大大您好!可不可以考虑一个群黑名单的功能,因为要添加的群实在太多了,能不能默认全部开放然后自己禁用不需要的群呢?期待您的回复,谢谢!

                      查看了结构,很不幸目前堆叠的感觉不是很方便更改,权限管理属于最开始架构的部分,这部分突然改变会导致后面几乎要重构,所以等待后续的开发吧, sry, >_<

                      1 Reply Last reply Reply Quote 1
                      • fufuzhou
                        fufuzhou @GeneralK1ng last edited by

                        @GeneralK1ng 但是现在这么直接抛异常的话,外面一层捕捉到就会报缓存异常,机器人添加的群很多但是并没有加入名单的话,群里的每一句话都会会产生一次异常,于是大量的“缓存异常”到log里面,我感觉也会影响正常查错。或者有没有别的什么办法来区分意料外的异常和没有权限这件事?

                        1 Reply Last reply Reply Quote 0
                        • 凉开水233
                          凉开水233 last edited by

                          QQ_1721574998721.png
                          2024-07-21 23:16:23 E/com.generalk1ng.Kookie: 配置文件加载失败
                          java.lang.NullPointerException
                          at java.base/java.util.Objects.requireNonNull(Objects.java:208)
                          at Kookies-0.1.8.mirai2.jar//org.kookies.mirai.commen.config.ConfigurationLoader.installFonts(ConfigurationLoader.java:234)
                          at Kookies-0.1.8.mirai2.jar//org.kookies.mirai.commen.config.ConfigurationLoader.init(ConfigurationLoader.java:63)
                          at Kookies-0.1.8.mirai2.jar//org.kookies.mirai.plugin.Kookie.onEnable(Kookie.java:61)
                          at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:244)
                          at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:393)
                          at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:40)
                          at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
                          at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:54)
                          at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173)
                          at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:193)
                          at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:360)
                          at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:512)
                          at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:182)
                          at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:181)
                          at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:59)
                          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:86)
                          at org.itxtech.mcl.Utility.bootJars(Utility.java:76)
                          at org.itxtech.mcl.Utility.bootMirai(Utility.java:98)
                          at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113)
                          at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123)
                          at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196)
                          at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
                          at org.itxtech.mcl.Loader.start(Loader.java:196)
                          at org.itxtech.mcl.Loader.main(Loader.java:84)

                          GeneralK1ng 1 Reply Last reply Reply Quote 0
                          • GeneralK1ng
                            GeneralK1ng @凉开水233 last edited by

                            @凉开水233 该问题应该是我写的自动安装字体,可以尝试用一下词云,如果图片显示方框则字体没有安装成功,建议手动安装,为正常现象,手动安装后重启mcl即可

                            1 Reply Last reply Reply Quote 0
                            • L
                              LJ-XD last edited by

                              image.png
                              我这边显示缓存异常,去程序里找了一下,发现是一个综合的一个缓存异常,能不能把具体的异常信息抛出来,这样找错也方便一点

                              GeneralK1ng 1 Reply Last reply Reply Quote 0
                              • GeneralK1ng
                                GeneralK1ng @LJ-XD last edited by

                                @LJ-XD 正在考虑优化

                                1 Reply Last reply Reply Quote 0
                                • 1
                                  1215482204 last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • 1160992400
                                    1160992400 last edited by

                                    向大佬请教一下我配置好之后出现缓存异常是哪里出了问题呢
                                    ECEA0E828D6408D76E89DE141ACCF0E2.png
                                    5f143c0c0a7e87a48f4be4e733e661db.png

                                    1 Reply Last reply Reply Quote 0
                                    • SiinaYuki
                                      SiinaYuki last edited by

                                      使用今日老婆的功能的时候报错了
                                      错误如下
                                      2024-09-28 02:07:13 E/com.generalk1ng.Kookie: Exception in coroutine Plugin com.generalk1ng.Kookie of com.generalk1ng.Kookie
                                      java.lang.IllegalArgumentException: Unsupported image type (mirai) for ExternalResource net.mamoe.mirai.internal.utils.ExternalResourceImplByByteArray@673fc31a, considering use gif/png/bmp/jpg format. image header: 3C 68 74 6D 6C 3E 0D 0A 3C 68 65 61 64 3E 3C 74 69 74 6C 65 3E 34 30 34 20 4E 6F 74 20 46
                                      at net.mamoe.mirai.internal.message.image.ImageDecoderKt.calculateImageInfo(ImageDecoder.kt:159)
                                      at net.mamoe.mirai.internal.contact.CommonGroupImpl$uploadImage$lambda$16$$inlined$runBIO$1.invoke(CoroutineUtils.kt:23)
                                      at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
                                      at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
                                      at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
                                      at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                      at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                                      at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
                                      at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
                                      at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
                                      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
                                      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
                                      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

                                      GeneralK1ng 1 Reply Last reply Reply Quote 0
                                      • GeneralK1ng
                                        GeneralK1ng @SiinaYuki last edited by

                                        @SiinaYuki 已修复,请改用0.1.9版本

                                        1 Reply Last reply Reply Quote 0
                                        • fufuzhou
                                          fufuzhou last edited by

                                          所以0.1.9新加的识别图片的功能是怎么用的?大概看了一下是调用baidu的api?

                                          GeneralK1ng 1 Reply Last reply Reply Quote 0
                                          • GeneralK1ng
                                            GeneralK1ng @fufuzhou last edited by

                                            @fufuzhou 百度API,但是功能感觉比较鸡肋,mirai 的接口好像有点老了,消息链里的图片拿不到,只能通过Win怀旧版qq的消息内图片才可以,很不方便

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 3 / 4
                                            • First post
                                              Last post
                                            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact