Added awaitingTimeout function (not tested, good luck team)
This commit is contained in:
@ -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])
|
||||
Reference in New Issue
Block a user