Skip to content

Commit

Permalink
cqhttp: support go-cqhttp version
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Aug 25, 2020
1 parent 7f08245 commit 6047061
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/adapter-cqhttp/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ export interface ImageInfo {
}

export interface VersionInfo {
version?: string
goCqhttp?: boolean
runtimeVersion?: string
runtimeOs?: string
Expand Down Expand Up @@ -395,9 +396,9 @@ interface CQNode {
defineAsync('set_group_name', 'group_id', 'name')

export function toVersion(data: VersionInfo) {
const { coolqEdition, pluginVersion, goCqhttp } = data
const { coolqEdition, pluginVersion, goCqhttp, version } = data
if (goCqhttp) {
return `Go-CQHTTP`
return `Go-CQHTTP/${version.slice(1)}`
} else {
return `CoolQ/${capitalize(coolqEdition)} CQHTTP/${pluginVersion}`
}
Expand Down

0 comments on commit 6047061

Please sign in to comment.