Im trying to add a command to my bot, said command will display the avatar of whoever is mentioned. For example >pfp @user1 would display user1's avatar.
However my code is returning an error of message.member.displayAvatarURL(); is not a function
let member = message.mentions.members.first();
if(member){
message.member.displayAvatarURL();
}
What would be the appropriate syntax to execute this?