-1

For example:

@client.command()
async def hello(ctx):
   await ctx.send('hello')
   facts()

async def facts(ctx):
   await ctx.send('facts')

I tried this but it usually gives an error like - RunTimeWarning: 'coroutine _____ was never awaited'

mr_noob123
  • 11
  • 2
  • Does this answer your question? [Learning asyncio: "coroutine was never awaited" warning error](https://stackoverflow.com/questions/54441424/learning-asyncio-coroutine-was-never-awaited-warning-error) – TheFungusAmongUs Apr 12 '22 at 14:31
  • Please, in the future, you can search your error through google and typically find a good solution on stack overflow. – TheFungusAmongUs Apr 12 '22 at 14:37

1 Answers1

0

The answer to this question is to add an await. before your async function.

@client.command()
async def hello(ctx):
   await ctx.send('hello')
   await facts(ctx)

async def facts(ctx):
   await ctx.send('facts')

And there you'd be able to call your async function.

user18478673
  • 182
  • 1
  • 6