avatar: fix guild avatar false positive
This commit is contained in:
parent
ca06a94981
commit
017c1839fc
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ avatar.callback = async function (msg, line, [user], {server, guild}) {
|
||||||
|
|
||||||
const defaultAvatar = getDefaultAvatar(member.id, member.user?.discriminator ?? member.discriminator ?? 0);
|
const defaultAvatar = getDefaultAvatar(member.id, member.user?.discriminator ?? member.discriminator ?? 0);
|
||||||
const normalAvatar = member.user?.avatar ?? member.avatar;
|
const normalAvatar = member.user?.avatar ?? member.avatar;
|
||||||
const guildAvatar = guildObj ? member.avatar : null;
|
const guildAvatar = guildObj && guildObj.members.get(member.id) ? member.avatar : null;
|
||||||
|
|
||||||
const normalUrl = normalAvatar ? CDNEndpoints.USER_AVATAR(member.id, normalAvatar) : defaultAvatar;
|
const normalUrl = normalAvatar ? CDNEndpoints.USER_AVATAR(member.id, normalAvatar) : defaultAvatar;
|
||||||
const guildUrl = guildAvatar && CDNEndpoints.GUILD_MEMBER_AVATAR(guildObj.id, member.id, guildAvatar);
|
const guildUrl = guildAvatar && CDNEndpoints.GUILD_MEMBER_AVATAR(guildObj.id, member.id, guildAvatar);
|
||||||
|
|
Loading…
Reference in a new issue