From 6047061fea3b619993d42254f4c6bbb3ab670f59 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Wed, 26 Aug 2020 03:24:40 +0800 Subject: [PATCH] cqhttp: support go-cqhttp version --- packages/adapter-cqhttp/src/api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/adapter-cqhttp/src/api.ts b/packages/adapter-cqhttp/src/api.ts index d56d1c748a..cc62e7ed5d 100644 --- a/packages/adapter-cqhttp/src/api.ts +++ b/packages/adapter-cqhttp/src/api.ts @@ -360,6 +360,7 @@ export interface ImageInfo { } export interface VersionInfo { + version?: string goCqhttp?: boolean runtimeVersion?: string runtimeOs?: string @@ -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}` }