Nostrum.Struct.Emoji.image_url

You're seeing just the function image_url, go back to Nostrum.Struct.Emoji module for more information.

Specs

image_url(t()) :: String.t() | nil

Returns the url of a custom emoji's image. If the emoji is not a custom one, returns nil.

Examples

iex> emoji = %Nostrum.Struct.Emoji{id: 450225070569291776}
iex> Nostrum.Struct.Emoji.image_url(emoji)
"https://cdn.discordapp.com/emojis/450225070569291776.png"

iex> emoji = %Nostrum.Struct.Emoji{id: 406140226998894614, animated: true}
iex> Nostrum.Struct.Emoji.image_url(emoji)
"https://cdn.discordapp.com/emojis/406140226998894614.gif"

iex> emoji = %Nostrum.Struct.Emoji{id: nil, name: "Γ¡É"}
iex> Nostrum.Struct.Emoji.image_url(emoji)
nil