#command not found

1 messages · Page 1 of 1 (latest)

mild condor
#
class Signs(commands.Cog):

    def __init__(self, bot):
        self.bot = bot

    @commands.command()
    async def collage(self, ctx):
        pass
        
def setup(bot):
    bot.add_cog(Signs(bot)

My bot prefix is pepe, when I type pepecollage I get an error that command collage not found

#

Same thing for any command, wether it exists or not

grizzled heath
#

Likely not loading your cogs correctly.

mild condor
#

I have slash commands and they are working fine inside the cog

grizzled heath
#

Are you using Bot or InteractionBot?

mild condor
#

Bot

grizzled heath
#

Show where you're loading cogs

mild condor
#
class Bot(commands.Bot):

    def  __init__(self):
        intents = Intents.default()
        intents.message_content = True
        intents.guilds = True
        intents.members = True
        intents.reactions = True
        intents.invites = True
        super().__init__(command_prefix='pepe', help_command=None, intents=intents)
        self.load_exts()

    async def on_ready(self):
        print('Ready')

    def load_exts(self):
        exts = os.listdir('exts')
        for ext in exts:
            try:
                if ext != 'Disabled':
                    print('Loading extension' + ' ' + ext + '...')
                    self.load_extension('exts' + '.' + ext + '.' + 'commands')                      
            except Exception as e:
                print(str(e))
                continue
                     
load_dotenv()
token = os.environ.get('DISCORD_TOKEN')
bot = Bot()
bot.run(token)
grizzled heath
#

And it's printing that your cog is being loaded?

mild condor
#

Yes

#

If there is an error it shows it on catch