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')
More Related Contents:
- Why does on_message stop commands from working?
- How do I get the discord.py intents to work?
- Asynchronous method call in Python?
- Discord.py on_member_join not working, no error message
- Commands don’t run in discord.py 2.0 – no errors, but run in discord.py 1.7.3
- Why doesn’t multiple on_message events work?
- How do I mention a user in discord.py?
- Timeout for python coroutines
- Python – DM a User Discord Bot
- Turn functions with a callback into Python generators?
- Discord Bot can only see itself and no other users in guild
- What are the differences between Bot and Client?
- Discord.py error: TypeError: __new__() got an unexpected keyword argument ‘deny_new’
- Discord.py-rewrite wait_for() how do i use?
- Add button components to a message (discord.py)
- How can I run an async function using the schedule library?
- “RuntimeWarning: coroutine ‘BotBase.load_extension’ was never awaited” after updating discord.py
- discord.py how to wait for author message using wait_for?
- Python native coroutines and send()
- How to solve a “429: Too Many Requests” when running discord.py bot on repl.it?
- How do I make my discord.py bot use custom emoji?
- on_message() and @bot.command issue
- Mass DM bot was working fine and now it wont send messages
- on_member_join and remove dont work. How to make it work?
- Python [Invalid syntax] with async def
- How to edit a message in discord.py
- I want to let my Discord Bot send images/gifs
- Client.__init__() “missing 1 required keyword-only argument: ‘intents'”, or “takes 1 positional argument but 2 were given”
- Discord.py get user object from id/tag
- How to resolve the following error in discord.py: “TypeError __init__() missing 1 required keyword-only argument: ‘intents'” [duplicate]