$nickname
Returns the nickname of the user that executed the command, or the nickname of a specified member.
Usage:
$nickname[user ID (optional, defaults to the command author's ID)]
Explanation:
- If no
user ID
is provided, the function will return the nickname of the user who triggered the command. - If a
user ID
is provided, the function will attempt to retrieve the nickname of the member with that ID.
Example Scenarios:
!!exec $nickname
: If a user with the nickname "Member" executes this, the command will output "Member".!!exec $nickname[123456789012345678]
: If a user with the ID123456789012345678
has the nickname "Admin", the command will output "Admin". If the user does not have a nickname, it will return the username.
Related Functions
- $changeNickname: Change a member's nickname.
- $username: Get a member's username.
- $discriminator: Get a member's discriminator.
- $userTag: Return a member's username + discriminator (user tag).