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_os": runtime.GOOS,
|
||||
"version": base.Version,
|
||||
"protocol": func() int {
|
||||
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
|
||||
}
|
||||
}(),
|
||||
"protocol_name": client.SystemDeviceInfo.Protocol,
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user