Answer the question
In order to leave comments, you need to log in
@client.command error?
When writing an ordinary task via @client.command, an error pops up... NameError
Code:
@client.command( pass_context = True )
@commands.has_permissions( administrator = True )
async def clear( ctx, amount = 1000 ):
await ctx.channel.purge( Limit = amount + 1 )
Traceback (most recent call last):
File "allax.py", line 9, in <module>
@client.command( pass_context = True )
NameError: name 'client' is not defined
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question