Entity Info
userID
$userID
Returns the Discord ID of the user who triggered the command or interaction.
Syntax
$userID
$userID
The $userID function returns the Discord ID (snowflake) of the user who triggered the execution of the command or interaction.
Syntax
$userID
Return Value
- Type: Snowflake (numerical string of 17-19 digits)
- Returns the unique ID of the user on Discord.
Behavior
$userIDtakes no arguments.- Always returns the ID of the user who interacted with the bot (via command, button, menu, modal, etc.).
- The ID is a permanent numerical string — it never changes, unlike the username.
Examples
Display the user ID
$title[Your User ID]
$description[**ID:** `$userID`]
$color[#5865F2]
$sendMessage[]
Use the ID in a condition
$if[$userID==123456789012345678]
$sendMessage[Hello administrator!]
$else
$sendMessage[Hello user!]
$endif
Difference with $authorID
$userID: the user who triggered the interaction.$authorID: the author of the message (in the case of a message command).
In most simple cases, both are identical. In advanced contexts (workflows, interactions), $userID is recommended.
Notes
- The Discord ID is a permanent and unique snowflake.
- It is not possible to modify or delete a Discord ID.
- Use
$userIDin comparisons with$if[]to create commands reserved for specific users.