diff --git a/discord/utils.py b/discord/utils.py index e49a78bfd..63e64d485 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -690,6 +690,16 @@ def compute_timedelta(dt: datetime.datetime) -> float: return max((dt - now).total_seconds(), 0) +@overload +async def sleep_until(when: datetime.datetime, result: T) -> T: + ... + + +@overload +async def sleep_until(when: datetime.datetime) -> None: + ... + + async def sleep_until(when: datetime.datetime, result: Optional[T] = None) -> Optional[T]: """|coro|