MiraiForum

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

    萌新,想请教一下```messageId```该如何获取

    HTTP API和第三方SDK
    2
    5
    151
    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.
    • M
      MercerRH last edited by

      用ws发起请求时发现,按照文档说明,要获取消息内容需要一个messageId,请问这个字段的值应该在哪里获取呢?找了一遍文档好像没有相关说明

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

        那个可选是false啊,非必填项目。我的直观理解是messagechain里边某个元素的id字段。
        8597c237-caea-4d87-89bc-37d292d68f56-image.png

        M 1 Reply Last reply Reply Quote 0
        • M
          MercerRH @yoonching last edited by

          @yoonching 非常感谢,原来可选false是指非必填吗,我以为是

          • “可选吗?”
          • “False”

          必须填写的意思哈哈哈哈(

          yoonching 1 Reply Last reply Reply Quote 0
          • yoonching
            yoonching @MercerRH last edited by

            @mercerrh 不,我又想了想,觉得你理解的对...session是可以不传的,容我再想想这个id从哪里来

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

              https://github.com/project-mirai/mirai-api-http/blob/master/docs/api/MessageType.md#source

              看起来是这个的id,图片示例里messagechain第一条,type为Source元素的id
              58424ed7-2032-4072-8c88-a802dc443dc2-image.png

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