fix: 获取头像报错

This commit is contained in:
bietiaop 2024-07-28 12:56:11 +08:00
parent 075a6d4fd0
commit 0ccc8b7484

View file

@ -94,7 +94,7 @@ export class ZZZPlugin extends plugin {
userData = userData?.list[0];
// 获取用户头像
let avatar = this.e.bot.avatar;
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) {