Slash Command - Webhook Avatar Not Setting Correctly to User's Avatar
I'm facing an issue where the webhook's avatar is not being set correctly to the user's avatar. Instead, it appears to be blank or set to the default Discord avatar.
Expected Behavior:
The webhook's avatar should be set to the same avatar as the user who executed the command, making it easy to identify which user initiated the
/echo
command.
Actual Behavior:
The webhook's avatar is either set to the default Discord avatar, not matching the user's avatar who executed the command.
Here's the part of my code for the /echo
command:
Can someone help me understand what I might be doing wrong or suggest an alternative approach to correctly set the webhook's avatar?3 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.
- Issue solved? Press the button!user.avatarURL() is a method
hello thank you for your response i changed what u suggested:
but it still does not give me the avatar
i just change avatarURL() to interaction.user.avatarURL()
it works now