diff --git a/src/modules/utility/avatar.js b/src/modules/utility/avatar.js index 9f0de38..58e8036 100644 --- a/src/modules/utility/avatar.js +++ b/src/modules/utility/avatar.js @@ -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 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 guildUrl = guildAvatar && CDNEndpoints.GUILD_MEMBER_AVATAR(guildObj.id, member.id, guildAvatar);