Reputation: 11
my problem are the packages are the tags one
the main.py code
from discord.ext import commands
import music
cogs = [music]
client = commands.Bot(command_prefix='sus!', intents = discord.Intents.all())
for i in range(len(cogs)):
cogs[i].setup(client)
client.run("The discord bot id")```
Upvotes: 1
Views: 73
Reputation: 69
So it seems you forgot to import discord... do
import discord from discord.ext import commands
this is definetly gonna fix your problem but remember you can't take something from something that you haven't imported. Just like you can't take something from discord.ext if you haven't imported discord since discord.ext is extension and you haven't even imported discord.
Upvotes: 1
Reputation: 559
So error seems to be ur syntax error in ur music.py
line 2 make from discord.ext import commands
If it works , pls make this answer as accepted answer
Upvotes: 1