Answer the question
In order to leave comments, you need to log in
Python, Discord how to call a function without waiting for the end of the same function?
the question is very strange, look at the point:
I have a function
@bot.command()
async def test(ctx):
for i in range(10):
await ctx.send(i)
time.sleep(5)
Answer the question
In order to leave comments, you need to log in
import asyncio
@bot.command()
async def test(ctx):
for i in range(10):
await ctx.send(i)
await asyncio.sleep(5)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question