Skip to content

function setServerDescription

This function will set the description of the server.
Original: setServerDescription

Declaration

async def setServerDescription(description : str)

Parameters

str description: the server description.

Returns

bool: true if server description was set successfully, otherwise false.

Source code in src/pyg2o/functions/game.py
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
async def setServerDescription(description : str):
    """
    This function will set the description of the server.
    Original: [setServerDescription](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setServerDescription/)

    ## Declaration
    ```python
    async def setServerDescription(description : str)
    ```
    ## Parameters
    `str` **description**: the server description.
    ## Returns
    `bool`: `true` if server description was set successfully, otherwise `false`.
    """
    data = f'return {get_call_repr()}'

    server = await PythonWebsocketServer.get_server()
    result = await server.make_request(data)
    return result