Skip to content

Commit 15e53e7

Browse files
committed
enhance: update GetQQAvatar to return structured response with URL
1 parent 7123467 commit 15e53e7

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/onebot11/action/llonebot/GetQQAvatar.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ interface Payload {
55
user_id: string
66
}
77

8-
export class GetQQAvatar extends BaseAction<Payload, string> {
8+
interface Response {
9+
url: string
10+
}
11+
12+
export class GetQQAvatar extends BaseAction<Payload, Response> {
913
actionName = ActionName.GetQQAvatar
1014

11-
protected async _handle(payload: Payload){
12-
return `https://thirdqq.qlogo.cn/g?b=qq&nk=${payload.user_id}&s=640`
15+
protected async _handle(payload: Payload) {
16+
return { url: `https://thirdqq.qlogo.cn/g?b=qq&nk=${payload.user_id}&s=640` }
1317
}
1418
}

0 commit comments

Comments
 (0)