Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法正常发送带图片的消息 #14

Open
DIM0x opened this issue Feb 25, 2024 · 1 comment
Open

无法正常发送带图片的消息 #14

DIM0x opened this issue Feb 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@DIM0x
Copy link

DIM0x commented Feb 25, 2024

使用nonebot2,插件采用反向ws与其连接。提交发送的信息带有图片和文字,而最终发送结果只有文字,图片消失。

日志:

2024-02-24 17:30:54 I/Bot.181*****3: Login successful                                  
2024-02-24 17:30:54 I/Bot.181*****3: Saved account secrets to local cache for fast login.                                          
2024-02-24 17:30:55 I/Bot.181*****3: Login successful.                                 
2024-02-24 17:30:56 V/Bot.181******3: Event: BotOnlineEvent(bot=Bot(*********))        
2024-02-24 17:30:56 I/Bot.181****83: Bot login successful.                             WS服务器: 127.0.0.1:11444bot-mirai: 创建反向
2024-02-24 17:30:57 I/onebot-mirai: Bot: 18*****3 创建Session                         
2024-02-24 17:30:57 I/OneBotWsClient: Bot: 18*****83 反向Websocket服务端 / 成功连接
2024-02-24 17:31:23 I/OneBotWsClient: 收到原始消息:
 {"action": "send_msg", "params": {"user_id": ****, "group_id": ****, "message_type": "group", "message": [ {"type": "image", "data": {"file": "base64://iVBORw0KGgoAAAANSUhEUgAAAEAAAABAC......tOkOfBvBfo1rkJggg==", "type": null, "cache": "true", "proxy": "true", "timeout": null}}, {"type": "text", "data": {"text": "\n"}}, {"type": "text", "data": {"text": "\u540d\u79f0\uff1aplay.mcif.cn \u30101.20.1<省略文字内容>"}}, "echo": "99"}
2024-02-24 17:31:41 V/Bot.*******: Group(*********) <-                                         
名称:play.mcif.cn 【1.20.1】  ........

settings.yml

bots:
  181****83:
    cacheImage: true
    cacheRecord: true
    heartbeat:
      enable: false
      interval: 1500
    http:
      enable: false
      host: 0.0.0.0
      port: 6700
      accessToken: ''
      postUrl: ''
      postMessageFormat: string
      secret: ''                               
      timeout: 0
    ws_reverse:
      - enable: true
        postMessageFormat: string
        reverseHost: 127.0.0.1
        reversePort: 11444
        accessToken: ''
        reversePath: 'onebot/v11/ws'
        reverseApiPath: 'onebot/v11/ws/api'
        reverseEventPath: 'onebot/v11/ws/event'
        useUniversal: true
        useTLS: false
        reconnectInterval: 3000
    ws:
      enable: false
      postMessageFormat: string
      wsHost: 0.0.0.0
      wsPort: 8080
      accessToken: ''                           
    db:
      enable: true          
    debug: false                                    
    proxy: ''

临时解决方法:换用onenot-kotlin,可以正常发送,附日志

2024-02-25 13:07:00 V/Bot.181****783: Group(25****808) <- [mirai:image:{1C52B015-2850-81B9-61E0-1FAABD69D1DF}.png, width=64, height=64, size=6403, type=PNG, isEmoji=false]     
名称:pg.mcif.cn 【1.20.1  .......(省略)
@cnlimiter cnlimiter added the bug Something isn't working label Mar 18, 2024
@Starrain08
Copy link

加一,同样出现此问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants