simple-robot / simpler-robot

Simple Robot,一个bot风格的Kotlin多平台事件调度框架,异步高效、Java友好!/ A Bot-style Kotlin Multiplatform event scheduling framework, asynchronous and high-performance, java-friendly! 🐱😼😻😸
https://simbot.forte.love
GNU Lesser General Public License v3.0
513 stars 44 forks source link

3.0无法监听消息 #553

Closed Kt-wang closed 1 year ago

Kt-wang commented 1 year ago

版本号

3.0.0

附加版本

No response

问题描述

3.0在使用一天后 再次启动遇到消息无法监听 换了几个账号并且清理缓存都不好使 期间没有更改相关配置

复现方式

@Component
abstract class MyListener {
    @Listener
    @Filter("/info", matchType = MatchType.TEXT_EQUALS)
    suspend fun GroupMessageEvent.getServerInfo() {
        try {
            logger.info("/info")
        } catch (e: Exception) {
            logger.error("链接服务器失败")
            e.printStackTrace()
            group().send("连接服务器失败")
        }
    }
}

相关日志

No response

其他补充

No response

Kt-wang commented 1 year ago
2022-12-27T16:19:00.627+08:00  INFO 3632 --- [atcher-worker-5] love.forte.simbot.mirai.net.1427108819   : Scheduled key refresh in 23h 55min 0.0s.
2022-12-27T16:19:00.627+08:00  INFO 3632 --- [atcher-worker-2] love.forte.simbot.mirai.net.1427108819   : Scheduled refresh login session in 19d 23h 55min 0.0s.
2022-12-27T16:19:00.629+08:00  INFO 3632 --- [atcher-worker-7] love.forte.simbot.mirai.bot.1427108819   : Bot login successful.
2022-12-27T16:19:00.630+08:00  INFO 3632 --- [atcher-worker-7] s.a.a.SpringBootApplicationConfiguration : Bot [MiraiBot(id=1427108819, isActive=true, eventProcessor=love.forte.simbot.core.event.SimpleEventListenerManagerImpl@20d19f2c, manager=MiraiBotManager(bots=[1427108819], isActive=true, eventProcessorlove.forte.simbot.core.event.SimpleEventListenerManagerImpl@20d19f2c)@830687787)] started: true
2022-12-27T16:19:00.631+08:00  INFO 3632 --- [atcher-worker-7] s.a.a.SpringBootApplicationConfiguration : Simbot Spring Boot Application built in 2.157927800s
2022-12-27T16:19:00.695+08:00  INFO 3632 --- [           main] com.huahua.demo.ApplicationKt            : Started ApplicationKt in 4.872 seconds (process running for 6.841)

这是启动后的相关日志

ForteScarlet commented 1 year ago

请尝试更新到最新版本并检查监听函数注册相关的日志,以及监听函数所在类不应是抽象类

Kt-wang commented 1 year ago

感谢 好哥哥