Note
This functions supports pass_exception: bool optional argument for manual handling exceptions.
This function will set the current time in the game to the given time, for all the players.
Original: setTime
Declaration
async def setTime(hour : int, min : int, day : int = 0)
Parameters
int hour: the hour of new time (in the range between 0-23) or subtract value from hour (hour < 0).
int mins: the minute of new time (in the range between 0-59) or subtract value from mins (mins < 0).
int day: the day of new time or subtract value from day (day < 0).
Source code in src/pyg2o/functions/game.py
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320 | async def setTime(hour : int, min : int, day : int = 0):
"""
!!! note
This functions supports ``pass_exception: bool`` optional argument for manual handling exceptions.
This function will set the current time in the game to the given time, for all the players.
Original: [setTime](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setTime/)
## Declaration
```python
async def setTime(hour : int, min : int, day : int = 0)
```
## Parameters
`int` **hour**: the hour of new time (in the range between 0-23) or subtract value from hour (hour < 0).
`int` **mins**: the minute of new time (in the range between 0-59) or subtract value from mins (mins < 0).
`int` **day**: the day of new time or subtract value from day (day < 0).
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|