guild icon url not working

so basically i'm having problems with fetching the icon URL of a guild, this is my code and it's giving me this error. I tried with displayAvatarURL also for a user command and that gives me a similar error where it doesn't spit out an actual string with the URL. any help?
11 Replies
d.js toolkit
d.js toolkit17mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Sandal Eater
Sandal EaterOP17mo ago
so how could I get the guild's icon in a URL?
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs17mo ago
method Guild#iconURL() The URL to this guild's icon.
Sandal Eater
Sandal EaterOP17mo ago
so if I used it to make a variable then would that work and turn into a string URL to then be used? sorry its just a bit confusing
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Sandal Eater
Sandal EaterOP17mo ago
when I tried that it said null in chat
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Sandal Eater
Sandal EaterOP17mo ago
alr thank you
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server