Nostrum.Struct.Guild.icon_url

You're seeing just the function icon_url, go back to Nostrum.Struct.Guild module for more information.
Link to this function

icon_url(guild, image_format \\ "webp")

View Source

Specs

icon_url(t(), String.t()) :: String.t() | nil

Returns the URL of a guild's icon, or nil if there is no icon.

Supported image formats are PNG, JPEG, and WebP.

Examples

iex> guild = %Nostrum.Struct.Guild{icon: "86e39f7ae3307e811784e2ffd11a7310",
...>                               id: 41771983423143937}
iex> Nostrum.Struct.Guild.icon_url(guild)
"https://cdn.discordapp.com/icons/41771983423143937/86e39f7ae3307e811784e2ffd11a7310.webp"
iex> Nostrum.Struct.Guild.icon_url(guild, "png")
"https://cdn.discordapp.com/icons/41771983423143937/86e39f7ae3307e811784e2ffd11a7310.png"

iex> guild = %Nostrum.Struct.Guild{icon: nil}
iex> Nostrum.Struct.Guild.icon_url(guild)
nil