I am trying to write a Cloudscript for the client to call ListMultiplayerServers from the MultiplayerAPI. I have no experience with javascript, so I'm unsure of the proper way to write the Cloudscript function. I am currently wrapping the request on the Client-side in the class ListMultiplayerServersRequest, and passing that as the function args. From my understanding, I should validate the args Server-side and then make the API call. Here is my attempt, I would appreciate any and all feedback:
handlers.ListServers = function(args){ if(!args || !args instanceof multiplayer.ListMultiplayerServersRequest){return}; var response = multiplayer.ListMultiplayerServers(args); return{ response: response}; }