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)}\``, title: `Avatar for \`${formatUsername(member)}\``,
}; };
const normalAvatar = member.user.avatar; const normalAvatar = member.user?.avatar ?? member.avatar;
const guildAvatar = member.avatar; const guildAvatar = guild ? member.avatar : null;
const normalUrl = const normalUrl =
AVATAR_BASE + AVATAR_BASE +