GuildCreate and GuildDelete iconURL when null
Hello, I'm trying to make my bot log which servers it joined/left with name, icon and id but it creates an error and doesn't post the embed when the server doesn't have an iconURL
guild.iconURL returns:
Anyone how how to handle this case and make the bot post the embed without the iconurl when the server doesn't have an icon?
3 Replies
- 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!I don't know what you mean. I already call the function but I need to know how to handle that case
ah
It says that the guild icon exists
I made it log 'No' when there is an iconURL and 'Yes' when there isn't.
I tried with a server that has an icon and it logged no
I tried with a server that does not have an icon and it still logged no
wth it returns null
ah, maybe because iconURL instead of icon
icon returns null
yeah, sorry XD
thanks for your help