MiraiForum

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

    qq群 发消息异常

    BUG反馈
    3
    6
    380
    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.
    • H
      H1W0XXX last edited by

      安卓手机 mirai 3.1.7
      扩展插件 https://project-mirai.github.io/mirai-api-http/API.html#状态码
      python调用
      在群内发消息,超过2个字符的发不出去

      可发送 :
      12
      ai
      a1
      pq

      不可发送:
      asd
      aw1
      12345
      汉
      字

      群内无法发送图片
      私聊好友一切正常

      python 代码

      s1 = requests.session()
      #登录省略
      def sendImageMessage(sessionKey, ID, imgUrl):
          j = {
              "sessionKey": sessionKey,
              # "qq": ID,
              "group": ID,
              "urls": [imgUrl]
      }
      
          res = requests.post(mainUrl + '/sendImageMessage', json=j)
          print(res.text)
      
      s1 = requests.session()
      #登录省略
      def uploadImage(sessionKey, type1, imgName):
          data = {
              'sessionKey': sessionKey,
              'type': type1,
          }
       
          params = {"img": (imgName, open(imgName, 'rb'))}
      
          res = requests.post(mainUrl + '/uploadImage', data=data, files=params)
      
          print(res.text)
          return eval(res.content)["url"]
      
      def sendGroupMessage(sessionKey, groupID, msg):
          j = {
              "sessionKey": sessionKey,
              "group": groupID,
              "messageChain": [
                  {"type": "Plain", "text": msg}
      
      
              ]
          }
       
          print(s1.post(mainUrl + '/sendGroupMessage', json=j).text)
      
      1 Reply Last reply Reply Quote 0
      • Him188
        Him188 last edited by

        在官方安卓客户端能不能看到消息?

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

          @him188 看不到,手机登录安卓qq客户端手动登录可以正常发送

          1 Reply Last reply Reply Quote 0
          • H
            H1W0XXX last edited by

            高等级的qq号正常,低等级的不正常

            RainChan 1 Reply Last reply Reply Quote 0
            • RainChan
              RainChan 摸鱼 @H1W0XXX last edited by

              @h1w0xxx 可能是触发了腾讯的风控策略

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

                试试2.6.3

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