how can I check if member has avatar by server or normal avatar?
I have an avatar command that works fine except with people with avatar by server, what can I do?
here's the code
4 Replies
ā¢ What's your exact discord.js
npm list discord.js
and node node -v
version?
ā¢ Post the full error stack trace, not just the top part!
ā¢ Show your code!
ā¢ Explain what exactly your issue is.
ā¢ Not a discord.js issue? Check out #useful-servers.You're being really inconsistent getting user/member
If you make sure you get a member all the time it should work fine
and how can I do that?
I tried changing the
let avatar
part to this thing
didn't work not that, it's that I didn't understand what I was supposed to change I felt bad for asking again so I better look it up on Internet <:9_:991720192549851166>message.member.avatarURL() returns null if the member doesnt have a member avatar
thats the only check you need
but if you just want the url, you can just use
member.displayAvatarURL()
which returns the member avatar url if there is one or the users default avatar