新增 go-cqhttp 设置资料

This commit is contained in:
🌌 2023-07-19 20:11:50 +08:00
parent 05193e5e01
commit 8063c9d4d7
1 changed files with 8 additions and 0 deletions

View File

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