Added awaitingTimeout function (not tested, good luck team)

This commit is contained in:
2025-06-22 18:00:42 +01:00
parent 2a0def7fa6
commit 5dbd9211de

View File

@ -61,3 +61,17 @@ class Game:
"""
self._timeouts.append(Timeout(id, time.perf_counter()+delay))
def awaitingTimeout(self, id: str):
"""
Tells you if a timeout ID is on the timeout stack.
Args:
id (str): The timeout ID.
Returns:
bool: True if there is a timeout with that ID
ID on the stack, False otherwise.
"""
return any([timeout.id == id for timeout in self._timeouts])