mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
api: get_version_info remove protocol
field & add protocol_name
field
This commit is contained in:
parent
231544d51e
commit
0e08ceccdd
17
coolq/api.go
17
coolq/api.go
@ -1990,22 +1990,7 @@ func (bot *CQBot) CQGetVersionInfo() global.MSG {
|
|||||||
"runtime_version": runtime.Version(),
|
"runtime_version": runtime.Version(),
|
||||||
"runtime_os": runtime.GOOS,
|
"runtime_os": runtime.GOOS,
|
||||||
"version": base.Version,
|
"version": base.Version,
|
||||||
"protocol": func() int {
|
"protocol_name": client.SystemDeviceInfo.Protocol,
|
||||||
switch client.SystemDeviceInfo.Protocol {
|
|
||||||
case client.Unset, client.IPad:
|
|
||||||
return 0
|
|
||||||
case client.AndroidPhone:
|
|
||||||
return 1
|
|
||||||
case client.AndroidWatch:
|
|
||||||
return 2
|
|
||||||
case client.MacOS:
|
|
||||||
return 3
|
|
||||||
case client.QiDian:
|
|
||||||
return 4
|
|
||||||
default:
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
}(),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user