-
Notifications
You must be signed in to change notification settings - Fork 15
Variable Methods
Gets the value of a variable.
Parameters: variableName - The name of the variable you want to get the current value of
Alias: checkVar, getDate, getVariable
Example:
setVar("test", true);
if(getVar("test")) {
sendMessage('Test');
}
Sets the value of a given variable.
Parameters: variableName - The name of the variable you want to set the current value of value - The value you want to assign to the variable
Alias: setVariable
Example:
setVar("someBoolean", true);
setVar("someNumber", 2);
setVar("someFloat", 5.5);
setVar("someString", "Hello world!");
Sets the value of a given variable temporary for this session only.
Parameters: variableName - The name of the variable you want to set the current value of value - The value you want to assign to the variable
Alias: setTempVariable
Example:
setTempVar("someBoolean", true);
setTempVar("someNumber", 2);
setTempVar("someFloat", 5.5);
setTempVar("someString", "Hello world!");
Deletes a given variable including its value not matter if the variable is temporary or not.
Parameters: variableName - The name of the variable you want to delete
Alias: delVar, deleteVariable
Example:
deleteVar("someBoolean");
deleteVar("someNumber");
Sets a given variable to the current date.
Parameters: variableName - The name of the variable you want to set to the current date
Example:
setDate("someDate");
date = getVar("someDate");
date.addMinute(5).addDay(5);
sendMessage(date.hasPassed());
-> Prints false
date.addDay(-6);
sendMessage(date.hasPassed());
-> Prints true
Sets a given variable to the current date temporary for this session only.
Parameters: variableName - The name of the variable you want to set to the current date
Example:
date = setTempDate("someDate");
date.addMinute(5).addDay(5);
sendMessage(date.hasPassed());
-> Prints false
date.addDay(-6);
sendMessage(date.hasPassed());
-> Prints true
startDate -> The date at that the session started
prefSessionLength -> The amount of minutes that sub prefers as a session length
subName -> The name of the sub
domName -> The name of the dom
domFriend1Name -> The name of the first dom friend
domFriend2Name -> The name of the second dom friend
domFriend3Name -> The name of the third dom friend