Remove special casing of MAX_ASYNCIO_SECONDS in sleep_until
This compatibility code goes away in Python versions greater than 3.7
This commit is contained in:
parent
ff7094ce96
commit
93a92e6e1b
@ -40,7 +40,6 @@ import warnings
|
||||
from .errors import InvalidArgument
|
||||
|
||||
DISCORD_EPOCH = 1420070400000
|
||||
MAX_ASYNCIO_SECONDS = 3456000
|
||||
|
||||
class cached_property:
|
||||
def __init__(self, function):
|
||||
@ -400,9 +399,6 @@ async def sleep_until(when, result=None):
|
||||
when = when.astimezone()
|
||||
now = datetime.datetime.now(datetime.timezone.utc)
|
||||
delta = (when - now).total_seconds()
|
||||
while delta > MAX_ASYNCIO_SECONDS:
|
||||
await asyncio.sleep(MAX_ASYNCIO_SECONDS)
|
||||
delta -= MAX_ASYNCIO_SECONDS
|
||||
return await asyncio.sleep(max(delta, 0), result)
|
||||
|
||||
def valid_icon_size(size):
|
||||
|
Loading…
x
Reference in New Issue
Block a user