$getVar
Returns the value of the provided global variable. You can provide a userID in the 2nd field to get the global variable value.
You can provide a userID in the 2nd field to get the global variable value of the specific user.
This function can be used in bot.Status as of version 1.8.4

FUNCTION USAGE

  • $getVar[varName]
  • $getVar[varName;userID]

Properties:

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

Example 1: Getting the global variable value

1
bot.Command({
2
name: "check",
3
code:`
4
__Total messages sent in all servers the bot is in__
5
$numberSeparator[$getVar[Messages];,]
6
`})
Copied!

Example 2: Getting another users global variable value

1
bot.Command({
2
name: "check",
3
code:`
4
__Total messages sent by $username[$message[]] in every server they share with me__
5
6
$numberSeparator[$getVar[Messages;$message[]];,]
7
$onlyIf[$userExists[$message[]];That user doesn't exist!]
8
`})
Copied!
Copy link
Contents
Properties: