Traceback (most recent call last):
File "main.py", line 5, in <module>
bot = commands.Bot(command_prefix=".", intents=intents)
NameError: name 'commands' is not defined
I follow the code on the youtube but an error occurred and idk how to fix this?
I am need to code a bot and I'm learning Python basic
CodePudding user response:
The tutorial is outdated. It's for discord.js v12 I think. They are using v14 now. V12 is no longer supported.
CodePudding user response:
You have already imported everything from the commands
module, so just say bot = Bot(..)