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'
CodePudding user response:
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.