started a new discordpy program for the first time in a while, and was setting up cogs when this error was thrown:
here’s the bit of code responsible:
I’m almost positive that I’ve used this code in an older program and yet it refuses to work. the online docs proved unhelpful, so here i am.
I won’t embed it here, but if anyone wants, here’s my full program: https://i.imgur.com/YGOMF3K.png
edit: (ignore line numbers not lining up, I’ve removed some unrelated code in the screenshot)
edit 2: (also I’m 100% sure that wasn’t the code causing the error)
>Solution :
A discord.Client indeed has no attribute load_extension. You might confuse it for commands.Bot, which does have it.
If you define your client as commands.Bot, it should work.
from discord import commands
client = commands.Bot()

