排名获取头像失败,导致发图失败 (#607)

This commit is contained in:
story-x 2023-07-06 09:03:06 +08:00 committed by GitHub
parent 68db81a93c
commit ba3df37504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,14 +201,18 @@ async function renderCharRankList ({ e, uids, char, mode, groupId }) {
}
if (uid) {
let userInfo = await ProfileRank.getUidInfo(uid)
if (userInfo?.qq && e?.group?.pickMember) {
let member = e.group.pickMember(userInfo.qq)
if (member?.getAvatarUrl) {
let img = await member.getAvatarUrl()
if (img) {
tmp.qqFace = img
try {
if (userInfo?.qq && e?.group?.pickMember) {
let member = e.group.pickMember(userInfo.qq)
if (member?.getAvatarUrl) {
let img = await member.getAvatarUrl()
if (img) {
tmp.qqFace = img
}
}
}
} catch (e) {
// console.log(e)
}
}