Skip to content
← Back to Community
Command _ not found using cogs discord.py
Profile icon
tal3

I am trying to use cogs to make a discord bot. Previously I know this bot worked, because all my commands were in main.py. However, when I tried to start using cogs, every time I input a command in my discord server it gives a terminal output of “command _ not found”. If anyone could help me figure out why this is happening and how to solve the issue, that would be much appreciated.

Answered by ApoorvAgrawal [earned 5 cycles]
View Answer
Voters
Profile icon
tal3
Comments
hotnewtop
Profile icon
ApoorvAgrawal

You have an indentation error on line 80 on the cog_template.py, indent the docstring.

here:

image

Profile icon
ApoorvAgrawal

@ApoorvAgrawal And you have to indent line 94.

Profile icon
tal3

Thanks, that helped a lot. However, now, when I run it, I get a “callback for headline command is missing a ctx parameter”, even though I have the ctx parameter passed in the [email protected]

Profile icon
tal3

Never mind i figured that out, I needed to do self, ctx in any cog instead of just [email protected]

Profile icon
ApoorvAgrawal
Profile icon
ApoorvAgrawal

@tal3 yea ok

Profile icon
SamirKhanGT

no module named cog