#GuildCreate and GuildDelete iconURL when null

1 messages · Page 1 of 1 (latest)

edgy umbra

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:

iconURL(options = {}) {
  return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options);
}

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?