pycord icon indicating copy to clipboard operation
pycord copied to clipboard

@slash_command after reloading an extension no longer works.

Open itsflorent opened this issue 5 years ago • 2 comments

Summary

@slash_command reloading extension bug

Reproduction Steps

I used bot.load_extension("commands.slash"), after reloading the slash command in the cog doesn't work anymore.

Minimal Reproducible Code

@bot.command()
async def reload(ctx):
    msg = await ctx.reply("**Reloading all cogs...**")

    bot.unload_extension("commands.slash")
    bot.load_extension("commands.slash")

    await msg.edit(content=f"**Finish reloading all cogs!**")

Expected Results

That the slash commands work again after reloading.

Actual Results

image

Intents

all()

System Information

image

Checklist

  • [X] I have searched the open issues for duplicates.
  • [X] I have shown the entire traceback, if possible.
  • [X] I have removed my token from display, if visible.

Additional Context

No response

itsflorent avatar Nov 19 '21 22:11 itsflorent

What does it say if you enable logging (set to debug maybe)?

kiwiiiii7 avatar Nov 20 '21 14:11 kiwiiiii7

Expected and will be fixed in #433

BobDotCom avatar Nov 20 '21 17:11 BobDotCom