MiraiForum

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

    Bot 实例什么时候能复用(指在手动 logout 后可重新 login)?

    开发交流
    2
    3
    270
    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.
    • L
      LamGC last edited by

      rt,目前直接嵌入 Core 进行开发,有存在手动 relogin 的需要,目前设计是存储帐号和密码(md5),封装到自制的 BotBuilder 方便 relogin 时可以重新创建 Bot 实例,但之前绑定 Bot 实例的相关对象(比如获取 Contact 的 Factory 之类与 Bot 实例相关的对象)都要重新更换,比较麻烦。
      Mirai 不设计 Bot 实例复用的原因是啥?或者如果有计划的话预计哪个版本能支持呢?

      Him188 1 Reply Last reply Reply Quote 0
      • Him188
        Him188 @LamGC last edited by

        @lamgc 现在网络层仍然是第一版实现,功能都是在上面加的。实践证明它设计有缺陷,但由于它越来越复杂,现在重构需要花费大量精力,因此这方面的任务都搁置了。

        L 1 Reply Last reply Reply Quote 0
        • L
          LamGC @Him188 last edited by

          @him188 Hmmmm 行吧,了解了。

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