Entity Info
authorUsername
$authorUsername
Returns the global username of the author of the message that triggered the command.
Syntax
$authorUsername
$authorUsername
The variable $authorUsername returns the global username of the author of the message that triggered the command.
Syntax
$authorUsername
Return value
- Type: Character string
- The global username of the author
Behavior
$authorUsernametakes no arguments.- Equivalent to
$usernamefor text commands. - Returns the global username (not the server nickname).
Examples
Message from the author
$title[Command executed]
$author[$authorUsername;$authorAvatar]
$description[
**Author:** $authorUsername#$discriminator
**ID:** $authorID
]
$color[#5865F2]
$sendMessage[]
Notes
- To get the server nickname of the author, use
$nicknameor$displayName. $authorUsernameis useful for explicitly referencing the author of the message in logs or embeds.- In most cases,
$usernameand$authorUsernameare interchangeable.