can't get avatar per server with user.ID
Hi guys, so there is my problem, I have an avatar command that displays avatar per server & default avatar, this actually works very good but only without any mentions.
When I try to mention someone by ID or @ instead of showing me their avatar per server it shows MY avatar, but the default button works fine.
I get avatar per user via
message.member.displayAvatarURL
and default avatar via user.displayAvatarURL
I know what's the problem but I don't really know how to fix it, the principal problem is that message.member.displayAvatarURL
doesn't get the ID that I mention in a message, while message.member.displayAvatarURL
does, for example:
24 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
here's the code:
help
•
User#avatarURL()
global custom avatar, if set
• User#defaultAvatarURL
default avatar (clyde with colored background)
• User#displayAvatarURL()
global custom avatar or default avatar, if none
• GuildMember#avatarURL()
guild specific avatar, if setUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
for example, let's say i want to see the avatar of a random user with nitro like this user
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
this is what happends when I try to get his avatar
if I click on the blue button I will get his default avatar, which works fine
but I don't get his server avatar
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yes, my problem here, is, how I put his ID in the
member
definition. I can do this in the user
definition but in member doesn't workUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
yes, it's only an example, but people that have nitro and it's on the same server as my bot this keeps showing the avatar of the autor
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
oooooh
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
so, there's no way that I can display
message.member.displayAvatarURL()
with other user ID that isn't the author?Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
damnn
anyways, thanks for help me
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'll give it a try, thx