$getUserVar
Returns the value of the provided user variable. This variable is not global and the value can only be retrieved from the user in the server the command is executed in.
If no userID is defined in the 2nd field, bot retrieves the command authors variable value.

FUNCTION USAGE

  • $getUserVar[varName]
  • $getUserVar[varName;userID]

Properties:

varName - The variable being called in the command userID - The userID attached to the variable(You can omit this field to get the command authors variable value)

Example 1: Getting the command authors balance (economy)

1
bot.Command({
2
name: "bal",
3
code:`
4
Your bank balance is: $numberSeparator[$getUserVar[bank];,]
5
`})
Copied!

Example 2: Getting someone else's balance using the 2nd field (economy)

1
bot.Command({
2
name: "bal",
3
code:`
4
__$username[$findUser[$message[]]]'s bank balance:__
5
$numberSeparator[$getUserVar[bank;$findUser[$message[]]];,]
6
`})
Copied!
Copy link
Contents
Properties: