[Solved] discord.py, using slash command and prefix at the same time


You need to write the command twice, one with @commands.command and a second with @cog_ext.cog_slash

Maybe if the commands function is very long or you just do not want it twice you can spil it it into another funtion that you call with both commands

async def cmd(author):
    # do your commands stuff here

@commands.command(name="cmd")
async def command_cmd(ctx):
    await cmd(ctx.author) # call the cmd function

@cog_ext.cog_slash(name="cmd") # I'm not 100% sure if it works like that since i 
async def slash_cmd(ctx):      # 
    await cmd(ctx.author) # call the cmd function


1

solved discord.py, using slash command and prefix at the same time