1
0
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:
Mrs4s 2022-12-07 03:27:19 +08:00
parent 231544d51e
commit 0e08ceccdd
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -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,
})
}