Python Discord.py `time.sleep()` coroutine

time.sleep() stops the entire execution of the program. If you just want to delay one async response thread use asyncio.sleep

Example:

import asyncio

async def wait():
    await asyncio.sleep(5)
    print('I waited 5 seconds')

Leave a Comment