-
Notifications
You must be signed in to change notification settings - Fork 1
Functions
XHiddenProjects edited this page Aug 9, 2024
·
3 revisions
Functions can be used to execute and run WebServerAI which is loaded for JavaScript
To load the software use this function
{WebServerAI_Obj}.load();
This will submit data to the AI
/*
* Submits the user's data
* $input is user's information
*/
(...).submit(($input)=>{
if($input){
// Functions go here
}
});
This function will automatically check for valid commands to send out.
(...).submit(($input)=>{
if($input){
(...).addCmd($input); // Add command here
}
});
This is to send the information to the AI to process.
(...).submit(($input)=>{
if($input){
(...)
(...).send($input, true);
}
});
The results that the AI outputs
(...).submit(($input)=>{
if($input){
(...)
(...).results(($o)=>{
// Returns an array
console.log($o);
});
}
});