Categories
How to fix @client.event error in discord.py?
I added the @client.event line in my bot on discord.py, then I start the bot and I get the error NameError: name 'client' is not defined, what should I do?
Answer the question
In order to leave comments, you need to log in
It is necessary that the creation of the client goes to the first decorator.
client = discord.Client() # или если используется discord.ext.commands: # client = commands.Bot(command_prefix='%') @client.event async def ...
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question