mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
修复 TRSS-Yunzai 非icqq协议无法正常获取头像
This commit is contained in:
parent
e973e6e2a3
commit
93de063985
2 changed files with 5 additions and 5 deletions
|
|
@ -191,13 +191,13 @@ export class ZZZPlugin extends plugin {
|
|||
userData?.list?.find(item => item.game_uid == uid) || userData?.list?.[0];
|
||||
|
||||
// 获取用户头像
|
||||
let avatar = this.e?.bot?.avatar || '';
|
||||
if (this.e?.user_id) {
|
||||
avatar = `https://q1.qlogo.cn/g?b=qq&s=0&nk=${this.e.user_id}`;
|
||||
} else if (this.e.member?.getAvatarUrl) {
|
||||
let avatar = '';
|
||||
if (this.e.member?.getAvatarUrl) {
|
||||
avatar = await this.e.member.getAvatarUrl();
|
||||
} else if (this.e.friend?.getAvatarUrl) {
|
||||
avatar = await this.e.friend.getAvatarUrl();
|
||||
} else {
|
||||
avatar = this.e?.bot?.avatar
|
||||
}
|
||||
// 写入数据
|
||||
this.e.playerCard = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue