I made a bot with basic commands and a cog for every moderation command. When I start the bot, I only have access to the commands on main.py and not the ones in the cogs.
I used this load function:
@bot.event
async def load():
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
await bot.load_extension(f'cogs.{filename[:-3]}')
print(f"Loaded Cog: {filename[:-3]}")
else:
print("Unable to load pycache folder.")
none of the prints shows up in the console and i have no error
Here is the setup function in the cog:
async def setup(bot):
await bot.add_cog(bot)
You are using the incorrect decorator.
Use:
Also, please ensure you have enabled the 'Message Content' intent on your bot application. Read more on gateway intents here.
You can also learn more on creating Pycord commands here.