mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Add overloads to utils.sleep_until
This commit is contained in:
parent
c2f9e0be43
commit
0981f122af
@ -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|
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user