Client Error with

I’m working on a discord bot in python. However, client isn’t defined. I followed this tutorial and copied the code exactly from it along with adding a secret. But, it throws this error: Traceback (most recent call last): File "", line 6, in <module> @client.event NameError: name 'client' is not defined

Welcome to the forums @GageM1!

Could you send a link to your Repl so we can help you please?

Hey, welcome to the forums @GageM1!

I think you need to change line 4 to:

client = discord.Client(intents=discord.Intents.all())

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.