I am receiving the error "coroutine 'sleep' was never awaited" with asyncio & nextcord

Question:

Im using asyncio.sleep() for many of my commands, but I am getting the error "coroutine ‘sleep’ was never awaited". I am using nextcord, by the way. Heres the code in case its useful:

        embed=nextcord.Embed(title=catName, url=catLink, color=0xcc7314)
        embed.set_image(url=catURL)
        embed.set_footer(text=f"Cat image posted on r/{catSub} by {catPoster}")
        finding=nextcord.Embed(description=f"<a:loading:1018351524394569752> Finding `cat` image", color=0xcc7314)
        loading = await ctx.reply(embed=finding, allowed_mentions=pingManager)
        asyncio.sleep(3)
        await loading.edit(embed=embed)```
Asked By: Pure.

||

Answers:

Since asyncio.sleep is an asynchronous function it has to be awaited.

You can do this like you have for other functions:

await asyncio.sleep(3)
Answered By: RossM