From 8063c9d4d769b2de4f01aeaeb4a35ef1aed3ae28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Wed, 19 Jul 2023 20:11:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20go-cqhttp=20=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/adapter/go-cqhttp.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/adapter/go-cqhttp.js b/plugins/adapter/go-cqhttp.js index 94bc6f8..a675728 100644 --- a/plugins/adapter/go-cqhttp.js +++ b/plugins/adapter/go-cqhttp.js @@ -39,6 +39,11 @@ Bot.adapter.push(new class gocqhttpAdapter { resolve({ ...data, ...data.data }))) } + setProfile(data, profile) { + logger.info(`${logger.blue(`[${data.self_id}]`)} 设置资料:${JSON.stringify(profile)}`) + return data.sendApi("set_qq_profile", profile) + } + makeMsg(msg) { if (!Array.isArray(msg)) msg = [msg] @@ -547,6 +552,9 @@ Bot.adapter.push(new class gocqhttpAdapter { sendApi: data.sendApi, stat: { start_time: data.time }, + setProfile: profile => this.setProfile(data, profile), + setNickname: nickname => this.setProfile(data, { nickname }), + pickUser: user_id => this.pickFriend(data, user_id), pickFriend: user_id => this.pickFriend(data, user_id),