project-mirai / mirai-api-http

Mirai HTTP API (console) plugin
GNU Affero General Public License v3.0
1.66k stars 343 forks source link

websocket 怎么执行命令 #577

Closed jipfqf closed 2 years ago

jipfqf commented 2 years ago

如何用websocket执行命令,如下写法提示指定操作不支持

{ "syncId":1, "command":"commandExecute", "subCommand":"/autologin list", "content":{} }

ryoii commented 2 years ago
{
  "syncId":1, 
  "command":"commandExecute", 
  "content":{
    "command": [{"type": "Plain", "text": "/autologin list"}]
  }
}
jipfqf commented 2 years ago

好像不太行 image

ryoii commented 2 years ago

看了一眼文档是这个

{
  "syncId":1, 
  "command":"cmd_execute", 
  "content":{
    "command": [{"type": "Plain", "text": "/autologin list"}]
  }
}