Entity Info
guildIcon
$guildIcon[] — Server Icon (Alias)
$guildIcon[] is an alias of $serverIcon[]. It returns the URL of the Discord server icon.
Syntax
$guildIcon[(guildID)]
Parameters
| Parameter | Description |
|---|---|
guildID |
(Optional) The ID of a server. When omitted or empty, the current server is used. A non-empty value that is not a positive integer raises Invalid guild ID. |
Return Value
- Type :
string - The URL of the icon (
https://cdn.discordapp.com/icons/<guildID>/<hash>.png, or.gifwhen the icon hash starts witha_, i.e. animated), or an empty string. - If the server cannot be fetched, the value of the
guild.iconcontext variable supplied by the host is returned, or an empty string if there is none.
Examples
Embed with icon
$title[$guildName]
$thumbnail[$guildIcon]
$description[$serverDescription]
$color[#5865F2]
Footer with icon
$footer[$guildName;$guildIcon]
$description[Official message]
$color[#2ECC71]
Icon check
$if[$guildIcon==]
$sendMessage[⚠️ This server does not have a custom icon.]
$else
$sendMessage[✅ Server icon: $guildIcon]
$endif
Notes
$serverIconis not strictly identical: it takes no argument and raisesGuild not found.when the server cannot be fetched.- Returns an empty string if the server has no icon.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.