Entity Info
guildName
$guildName[] — Server Name (Alias)
$guildName[] is an alias of $serverName[]. It returns the name of the Discord server in which the command is executed.
Syntax
$guildName[(guildID)]
Parameters
| Parameter | Description |
|---|---|
guildID |
(Optional) The ID of a server. When omitted, the current server is used. When an argument is given it must be a positive integer, otherwise Invalid guild ID. is raised. |
Return Value
- Type:
string - Without argument: the
guild.namecontext variable supplied by the host if present, otherwise the name fetched from Discord for the current server. - With an ID: the name of that server.
Guild not found.is raised if it cannot be fetched.
Examples
Welcome Message
$sendMessage[Welcome to **$guildName**, $username! 🎉]
Custom Embed
$title[$guildName — Information]
$description[Everything you need to know about $guildName]
$addField[ID;$guildID;yes]
$addField[Members;$membersCount;yes]
$thumbnail[$guildIcon]
$color[#5865F2]
Logs
$log[New command executed on $guildName ($guildID)]
Condition
$if[$guildName==My Server]
$sendMessage[You are on the main server!]
$endif
Notes
$guildNameand$serverNameuse the same handler and are interchangeable.
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.