Based on mirai, a fast simple bot for maimai DX

Overview

maimai-bot

一个基于 mirai舞萌 DX 查分器 编写的 maimai DX QQ 机器人插件。

使用指南

点我下载

本插件开箱即用,只需和其他插件一样放入 MCL 或其他版本的 Mirai 控制台 的 plugins 目录即可。

如果您尚不清楚 Mirai 如何安装,请阅读 Mirai 官方教程 ,在安装好控制台后再安装本插件使用。

支持的功能

  • b40
  • b50
  • 查歌
  • XXX 是什么歌
  • 谱面详情(例:紫id11154)
  • 随机歌曲(例:随个紫12+)
  • 定数查歌
  • 分数线
  • 猜歌

常见问题

如何修改字体?

修改 config/xyz.xszq.maimai-bot/config.yml 中的 fontName值即可。

如何更新歌曲别名?

本项目内置的别名来自 歌曲别名添加表 ,如果需要更新,则需要切换到“现有歌曲别名表”并点击右上角,导出为→csv并保存到 config/xyz.xszq.maimai-bot/aliases.csv

查不到任何歌曲谱面信息?

请检查 舞萌 DX 查分器 是否可以访问,同时请检查您的网络连接是否畅通,是否开启了无效的代理设置等。

Comments
  • 1.3.0版本下指令没有任何反应

    1.3.0版本下指令没有任何反应

    问题描述

    在插件最新版本1.3.0和旧版本1.2.0时,输入b40 /b40等指令均无法相应,在1.3.0仅启用了该插件时仍对指令无相应

    运行环境

    系统环境:ubuntu 20.04 java环境:openjdk 17.0.2 2022-01-18 OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04) OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing) -Djava.awt.headless=true

    mcl及mirai-core均为最新

    尝试过的方法

    将其他插件移出plugins目录,仅启用maibot插件。

    运行日志

    仅启用maibot插件时日志如下

      10:24:08 [INFO] Verifying "net.mamoe:mirai-console" v2.12.1
      10:24:08 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.12.1
      10:24:08 [INFO] Verifying "net.mamoe:mirai-core-all" v2.12.1
      10:24:08 [INFO] Verifying "org.itxtech:mcl-addon" v2.0.2
    2022-08-16 10:24:09 I/main: Starting mirai-console...
    2022-08-16 10:24:09 I/main: Backend: version 2.12.1, built on 2022-07-31 17:49:27.
    2022-08-16 10:24:09 I/main: Frontend Terminal: version 2.12.1, provided by Mamoe Technologies
    2022-08-16 10:24:09 I/main: Welcome to visit https://mirai.mamoe.net/
    2022-08-16 10:24:09 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    2022-08-16 10:24:09 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
    2022-08-16 10:24:09 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    2022-08-16 10:24:10 I/plugin: Successfully loaded plugin MaimaiBot v1.3.0
    2022-08-16 10:24:10 I/plugin: Successfully loaded plugin MCL Addon v2.0.2
    2022-08-16 10:24:10 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
    2022-08-16 10:24:10 I/MCL Addon: iTXTech MCL Version: 2.1.0-71ec418
    2022-08-16 10:24:10 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
    2022-08-16 10:24:10 I/main: 2 plugin(s) enabled.
    2022-08-16 10:24:10 I/main: Auto-login 3074512344
    2022-08-16 10:24:11 W/stderr: ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
    2022-08-16 10:24:11 I/Bot.3074512344: Loaded account secrets from local cache.
    2022-08-16 10:24:12 I/Bot.3074512344: Saved account secrets to local cache for fast login.
    2022-08-16 10:24:12 I/Bot.3074512344: Login successful.
    2022-08-16 10:24:12 I/stdout: UNSUPPORTED CMAP format = 0
    2022-08-16 10:24:13 V/Bot.3074512344: Event: BotOnlineEvent(bot=Bot(3074512344))
    2022-08-16 10:24:13 I/Bot.3074512344: Bot login successful.
    2022-08-16 10:24:13 I/main: mirai-console started successfully.
    2022-08-16 10:24:15 I/MaimaiBot: 成功载入所有图片。
    2022-08-16 10:24:15 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    2022-08-16 10:24:15 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
    2022-08-16 10:24:15 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    2022-08-16 10:24:15 I/MaimaiBot: maimai-bot 插件加载完毕。
    2022-08-16 10:24:15 I/MaimaiBot: 正在缓存歌曲封面中……
    2022-08-16 10:24:22 I/MaimaiBot: 本次已缓存 0 个歌曲封面。
    2022-08-16 10:24:38 V/Bot.3074512344: [debug//(1093893936)] Strings1eaf(1752269559) -> b40
    2022-08-16 10:24:42 V/Bot.3074512344: [debug//(1093893936)] Strings1eaf(1752269559) -> /b40
    > help
    ◆ /autoLogin add <account> <password> [passwordKind]    # 添加自动登录, passwordKind 可选 PLAIN 或 MD5
      /autoLogin clear    # 清除所有配置
      /autoLogin list    # 查看自动登录账号列表
      /autoLogin remove <account>    # 删除一个账号
      /autoLogin removeConfig <account> <configKey>    # 删除一个账号的一个配置项
      /autoLogin setConfig <account> <configKey> <value>    # 设置一个账号的一个配置项
    ◆ /help     # 查看指令帮助
    ◆ /login <qq> [password] [protocol]    # 登录一个账号
    ◆ /logout <qq>    # 登出一个账号
    ◆ /permission cancel <被许可人 ID> <权限 ID>    # 撤销一个权限
      /permission deny <被许可人 ID> <权限 ID>    # 撤销一个权限
      /permission remove <被许可人 ID> <权限 ID>    # 撤销一个权限
      /permission cancelAll <被许可人 ID> <权限 ID>    # 撤销一个权限及其所有子权限
      /permission denyAll <被许可人 ID> <权限 ID>    # 撤销一个权限及其所有子权限
      /permission removeAll <被许可人 ID> <权限 ID>    # 撤销一个权限及其所有子权限
      /permission listPermissions    # 查看所有权限列表
      /permission lp    # 查看所有权限列表
      /permission permit <被许可人 ID> <权限 ID>    # 授权一个权限
      /permission grant <被许可人 ID> <权限 ID>    # 授权一个权限
      /permission add <被许可人 ID> <权限 ID>    # 授权一个权限
      /permission permittedPermissions <被许可人 ID> [显示全部]    # 查看被授权权限列表
      /permission pp <被许可人 ID> [显示全部]    # 查看被授权权限列表
      /permission grantedPermissions <被许可人 ID> [显示全部]    # 查看被授权权限列表
      /permission gp <被许可人 ID> [显示全部]    # 查看被授权权限列表
    ◆ /status     # 获取 Mirai Console 运行状态
    ◆ /stop     # 关闭 Mirai Console
    ◆ /mclc <MCL命令行参数>
    ◆ /mcl info <package>    # 获取包信息
      /mcl install <package> [channel] [type] [version] [lock or unlock]    # 安装包
      /mcl list    # 列出已安装的包
      /mcl remove <package>    # 移除包
      /mcl run <script>    # 执行模块load阶段
      /mcl update    # 执行updater模块
    
    
    opened by suyoleaves 5
  • user note:不影响运行的报错

    user note:不影响运行的报错

    在运行过程中会出现如下警告,但是不影响运行,担心未来是否会出现问题 2022-12-01 01:00:51 W/stderr: Exception in thread "DefaultDispatcher-worker-10" java.lang.NoSuchMethodError: 'net.mamoe.mirai.data.GroupHonorType net.mamoe.mirai.event.events.MemberHonorChangeEvent$Achieve.getHonorType()' 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.EventKt.convertBotEvent(event.kt:119) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.ConvertorKt.toDTO(convertor.kt:44) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.http.HttpAdapter.onReceiveBotEvent(HttpAdapter.kt:42) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.context.MahContext$handleBotEvent$1$1.invokeSuspend(MahContext.kt:116) 2022-12-01 01:00:51 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2022-12-01 01:00:51 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@62bf69f, Dispatchers.Default] 2022-12-01 01:00:51 W/stderr: Exception in thread "DefaultDispatcher-worker-15" Exception in thread "DefaultDispatcher-worker-1" java.lang.NoSuchMethodError: 'net.mamoe.mirai.data.GroupHonorType net.mamoe.mirai.event.events.MemberHonorChangeEvent$Achieve.getHonorType()' 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.EventKt.convertBotEvent(event.kt:119) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.ConvertorKt.toDTO(convertor.kt:44) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.http.HttpAdapter.onReceiveBotEvent(HttpAdapter.kt:42) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.context.MahContext$handleBotEvent$1$1.invokeSuspend(MahContext.kt:116) 2022-12-01 01:00:51 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2022-12-01 01:00:51 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@580feb80, Dispatchers.Default] 2022-12-01 01:00:51 W/stderr: Exception in thread "DefaultDispatcher-worker-7" java.lang.NoSuchMethodError: 'net.mamoe.mirai.data.GroupHonorType net.mamoe.mirai.event.events.MemberHonorChangeEvent$Achieve.getHonorType()' 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.EventKt.convertBotEvent(event.kt:119) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.ConvertorKt.toDTO(convertor.kt:44) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.http.HttpAdapter.onReceiveBotEvent(HttpAdapter.kt:42) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.context.MahContext$handleBotEvent$1$1.invokeSuspend(MahContext.kt:116) 2022-12-01 01:00:51 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2022-12-01 01:00:51 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@6bcab241, Dispatchers.Default] 2022-12-01 01:00:51 W/stderr: Exception in thread "DefaultDispatcher-worker-4" java.lang.NoSuchMethodError: 'net.mamoe.mirai.data.GroupHonorType net.mamoe.mirai.event.events.MemberHonorChangeEvent$Achieve.getHonorType()' 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.EventKt.convertBotEvent(event.kt:119) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.ConvertorKt.toDTO(convertor.kt:44) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.http.HttpAdapter.onReceiveBotEvent(HttpAdapter.kt:42) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.context.MahContext$handleBotEvent$1$1.invokeSuspend(MahContext.kt:116) 2022-12-01 01:00:51 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2022-12-01 01:00:51 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@4674fd33, Dispatchers.Default] 2022-12-01 01:00:51 W/stderr: java.lang.NoSuchMethodError: 'net.mamoe.mirai.data.GroupHonorType net.mamoe.mirai.event.events.MemberHonorChangeEvent$Achieve.getHonorType()' 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.EventKt.convertBotEvent(event.kt:119) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.internal.convertor.ConvertorKt.toDTO(convertor.kt:44) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.adapter.http.HttpAdapter.onReceiveBotEvent(HttpAdapter.kt:42) 2022-12-01 01:00:51 W/stderr: at mirai-api-http-2.6.2.jar//net.mamoe.mirai.api.http.context.MahContext$handleBotEvent$1$1.invokeSuspend(MahContext.kt:116) 2022-12-01 01:00:51 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 2022-12-01 01:00:51 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) 2022-12-01 01:00:51 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@506c869e, Dispatchers.Default]

    opened by MC57348 4
  • 关于一些bug

    关于一些bug

    b50调用的歌曲rating还是b40的: 需要用getNewRa()之后再重新排序一下 将牌无法正常生成: 这个应该是queryPlateRecord()调用目录的问题,修改下就能正常生成 橙将和晓将完成表无法正常生成: 都是歌曲封面没有被正常缓存的原因,橙将是因为一首11+叫Link的歌跟maimai plus里面一首也叫Link的歌冲突了,导致插件以为已经有该封面所以没有缓存; 晓将是因为13+的一首D✪N’T ST✪P R✪CKIN’ 的歌,猜测是字符串解析有问题,无法被正常缓存; 把封面手动添加到data里面再修改相应id就可以正常生成。 超系牌完成表生成两次: list里面写多了一个“超”

    bug 
    opened by Kincy1151 4
  • 加载插件时抛出 java.lang.LinkageError 错误

    加载插件时抛出 java.lang.LinkageError 错误

    相关日志:

    2022-11-14 22:01:26 I/MaimaiBot: 正在生成歌曲封面缓存图……
    2022-11-14 22:01:30 I/MaimaiBot: 正在生成定数表……
    2022-11-14 22:01:52 I/MaimaiBot: 成功载入所有图片。
    2022-11-14 22:01:52 E/MaimaiBot: Exception in coroutine Plugin xyz.xszq.maimai-bot of MaimaiBot
    java.lang.LinkageError: loader constraint violation: when resolving method 'org.slf4j.ILoggerFactory org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()' the class loader 'maimai-bot-1.3.2.mirai.jar' @79d82f66 of the current class, org/slf4j/LoggerFactory, and the class loader 'onebot-mirai-0.3.4-all.jar' @35c4e864 for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature (org.slf4j.LoggerFactory is in unnamed module of loader 'maimai-bot-1.3.2.mirai.jar' @79d82f66, parent loader 'global-shared' @4b65d9f4; org.slf4j.impl.StaticLoggerBinder is in unnamed module of loader 'onebot-mirai-0.3.4-all.jar' @35c4e864, parent loader 'global-shared' @4b65d9f4)
            at maimai-bot-1.3.2.mirai.jar//org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:423)
            at maimai-bot-1.3.2.mirai.jar//org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
            at maimai-bot-1.3.2.mirai.jar//mu.KotlinLogging.logger(KotlinLogging.kt:32)
            at maimai-bot-1.3.2.mirai.jar//com.github.doyaaaaaken.kotlincsv.client.CsvFileReader.<init>(CsvFileReader.kt:22)
            at maimai-bot-1.3.2.mirai.jar//com.github.doyaaaaaken.kotlincsv.client.CsvReader.openAsync(CsvReader.kt:182)
            at maimai-bot-1.3.2.mirai.jar//com.github.doyaaaaaken.kotlincsv.client.CsvReader.openAsync(CsvReader.kt:143)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot.reloadAliases(MaimaiBot.kt:308)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot.reload(MaimaiBot.kt:305)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot.access$reload(MaimaiBot.kt:75)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot$reload$1.invokeSuspend(MaimaiBot.kt)
            at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
            at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:233)
            at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
            at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
            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)
    

    此外,在加载 mcmotd-1.1.8.mirai.jar 插件时,也会抛出该错误,相关日志如下:

    2022-11-14 21:52:42 I/MaimaiBot: 正在生成歌曲封面缓存图……
    2022-11-14 21:52:50 I/MaimaiBot: 正在生成定数表……
    2022-11-14 21:53:12 I/MaimaiBot: 成功载入所有图片。
    2022-11-14 21:53:12 E/MaimaiBot: Exception in coroutine Plugin xyz.xszq.maimai-bot of MaimaiBot
    java.lang.LinkageError: loader constraint violation: when resolving method 'org.slf4j.ILoggerFactory org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()' the class loader 'maimai-bot-1.3.2.mirai.jar' @79d82f66 of the current class, org/slf4j/LoggerFactory, and the class loader 'mcmotd-1.1.8.mirai.jar' @1e977098 for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature (org.slf4j.LoggerFactory is in unnamed module of loader 'maimai-bot-1.3.2.mirai.jar' @79d82f66, parent loader 'global-shared' @4b65d9f4; org.slf4j.impl.StaticLoggerBinder is in unnamed module of loader 'mcmotd-1.1.8.mirai.jar' @1e977098, parent loader 'global-shared' @4b65d9f4)
            at maimai-bot-1.3.2.mirai.jar//org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:423)
            at maimai-bot-1.3.2.mirai.jar//org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
            at maimai-bot-1.3.2.mirai.jar//mu.KotlinLogging.logger(KotlinLogging.kt:32)
            at maimai-bot-1.3.2.mirai.jar//com.github.doyaaaaaken.kotlincsv.client.CsvFileReader.<init>(CsvFileReader.kt:22)
            at maimai-bot-1.3.2.mirai.jar//com.github.doyaaaaaken.kotlincsv.client.CsvReader.openAsync(CsvReader.kt:182)
            at maimai-bot-1.3.2.mirai.jar//com.github.doyaaaaaken.kotlincsv.client.CsvReader.openAsync(CsvReader.kt:143)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot.reloadAliases(MaimaiBot.kt:308)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot.reload(MaimaiBot.kt:305)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot.access$reload(MaimaiBot.kt:75)
            at maimai-bot-1.3.2.mirai.jar//xyz.xszq.MaimaiBot$reload$1.invokeSuspend(MaimaiBot.kt)
            at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
            at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:233)
            at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
            at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
            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)
    
    wait-for-reply 
    opened by shinyashen 2
  • 不要直接使用 GlobalEventChannel

    不要直接使用 GlobalEventChannel

    直接从 GlobalEventChannel 得到的监听器不受 插件生命周期管理

    https://github.com/xszqxszq/maimai-bot/blob/0ca5fb3fa87d02df4053a1935b6a2f13ebefb5e0/src/main/kotlin/MaimaiBot.kt#L94

    你应该使用 CoroutineScope.globalEventChannel() 这个扩展方法, KotlinPlugin/JvmPlugin 就是 CoroutineScope 的子类实现

    所以你可以 直接使用 var channel: EventChannel<Event> = globalEventChannel() 替换原本的代码

    opened by cssxsh 1
Releases(v1.3.3)
Owner
心水湛清
心水湛清
Synapse Moderation Bot - A bot for managing and moderating our community Discord server

Synapse Moderation Bot A bot for managing and moderating our community Discord server. Note This bot is not public. While you can host it on your own,

Synapse Technologies, LLC 1 Jul 16, 2022
一个简单的每日新闻速报/动画速报 mirai-console 插件

Mirai News Reporter 一个简单的每日新闻速报/番剧速报 mirai-console 插件 项目地址: https://github.com/LinHeLurking/mirai-news-reporter 功能 爬取知乎的一个每日新闻页面, 以图片形式分享. 向机器人说 "今日新闻

LinHe 56 Dec 25, 2022
TimmyBot is a discord bot based on Discord4J and LavaPlayer

TimmyBot TimmyBot is a discord bot based on Discord4J and LavaPlayer Invite Click here to invite Timmy to your server Commands ?play - Plays a song, e

Ian de Villiers 0 Apr 21, 2022
AsukaBot - A simple Kotlin Discord Bot

The Discord bot of the serber, a private Discord server. Asuka is a Discord But running on the JDA API but made in kotlin.

Yann ItzPeaxel 2 Apr 24, 2022
A simple Discord bot that aims to provide a snapshot of the join logs given a range of time for servers.

?? What is Humpy Dumpy? Humpy Dumpy is a simple Discord bot that aims to provide a snapshot of the join logs given a range of time for servers. It was

Miu 2 Aug 29, 2022
Simple configurable Twitch Chat Bot for Emote Repetition 😎

DopaminChatter Dopamin is the happiness hormone. What's better than a Twitch Chat with great Emote Usage and Emote Chains (same Emotes after another).

Jakob 2 Dec 9, 2022
Simple Telegram bot that responds with list of results obtained from Google.

Simple project focused on learning a little more about how Telegram bots work and are created. The bot has a very basic functionality: the user types

Jesus Ericks 3 Nov 13, 2022
💉🤖 Bot for the German "ImpfterminService - 116117"

?? ?? Impf-Bot Searches the official "ImpfterminService - Der Patientenservice 116117" for free Corona vaccination slots. It can search multiple locat

Tobse 160 Jan 5, 2023
Vkontakte API bot for trading VK Coin

Sweet Coin Market Vkontakte API bot for trading VK Coin. Please star this repo if you like ⭐ It's motivates me a lot! Yes, you can use the source code

null 2 Jan 28, 2022
A Chat-Bot Android Application

Sekobanashi_App A Chat-Bot Android Application. Features App Sekobanashi is a chat-bot/assistant android application where the user can chat with one

Siddharth Singh 1 Jan 7, 2022
KarboTipun - Karbo Tipun Bot For Android

KARBO TIPUN BOT Welcome to Karbo tip bot. You can tell me to tip users with KRB

Ruslan Sheremet 0 Jan 9, 2022
Urban Dictionary discord bot.

Urban Dictionary Installation & Setup 1. Clone the repository git clone https://github.com/thexxiv/urbandictionary-discord-bot.git 2. Navigate to the

XXIV 0 Jan 17, 2022
DiscordBot - Small Discord bot using JDA

Discord bot written in kotlin and using JDA Use it yourself ./gradlew build crea

chell 2 Feb 2, 2022
GoogleSearchBot - Google Search Bot With Kotlin

GoogleSearchBot Simple telegram bot on kotlin with spring framework With command

Kirill Golovin 1 Feb 7, 2022
A small bot for gitlab notification

Welcome to gitty ?? A small bot for gitlab notification with integration on different platform Usage You gotta change variables in .env on your own do

Starchenko Ilya 1 Nov 2, 2022
A Discord bot heavily inspired by Ultimate Bravery to spice up your Pokemon Unite experience.

UniteBraveryBot ?? A Discord bot heavily inpired by Ultimate Bravery to spice up your Pokemon Unite experience. Required Permissions ?? View Channels

Alexander Deledda 2 Sep 8, 2022
A repository that contains various examples of how to use the telegram-bot library.

Telegram-bot templates This repository contains simple different examples of how to use the telegram-bot library. How to use All the examples are conv

Jey 3 Nov 15, 2022
All things generative! Discord Bot

Thingy Discord bot to generate images based on a text prompt - way more than just that! Through a wide variety of tools, you can alter your generated

Peter Willemsen 17 Dec 15, 2022
A lightweight super-fast wireless file sharing application built on WiFi Peer-to-Peer technology.

ZipBolt ZipBolt is a file-sharing platform that allows digital devices to share files at incredible speeds using WiFi Peer-to-Peer technology. ZipBolt

Prosper Ekwerike 9 Sep 22, 2022