utility.avatar: fix in dms

This commit is contained in:
Cynthia Foxwell 2024-06-08 22:37:04 -06:00
parent c6b5e2c036
commit 9def169bd7

View file

@ -537,8 +537,8 @@ avatar.callback = async function (msg, line, [user], {server, guild}) {
title: `Avatar for \`${formatUsername(member)}\``,
};
const normalAvatar = member.user.avatar;
const guildAvatar = member.avatar;
const normalAvatar = member.user?.avatar ?? member.avatar;
const guildAvatar = guild ? member.avatar : null;
const normalUrl =
AVATAR_BASE +