Answer the question
In order to leave comments, you need to log in
How to make the issuance of a role in def?
Hello, while doing the mute command, I ran into a problem.
Problem: When time passes, the def unmute() function is run, but when I try to remove the role of the tormented one, it writes the following -- 'await' outside async function
What to do?
Answer the question
In order to leave comments, you need to log in
The problem is that you are using an asynchronous await in a synchronous function . To solve, use an asynchronous function through which you call the issuance of roles:
async def unmute(**kwargs):
... # Ваш код
and call this function withawait unmute()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question