doc: fix: docstring: use Promise

This commit is contained in:
2024-01-25 17:37:08 +01:00
committed by AdrienLSH
parent 22dd4a0299
commit f8490da953
8 changed files with 42 additions and 19 deletions

View File

@ -73,6 +73,10 @@ class Tourmanent
this.connected = false;
}
/**
*
* @returns {Promise<?>}
*/
async init()
{
let response = await this.client._get(`/api/tournaments/${id}`);
@ -108,6 +112,12 @@ class Tourmanent
this._socket.send(JSON.stringify({participate: ""}));
}
/**
* Join the tournament Websocket
* @param {CallableFunction} receive_func
* @param {CallableFunction} disconnect_func
* @returns {?}
*/
async join(receive_func, disconnect_func)
{
if (!await this.client.isAuthentificate())