pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Unloading an extension does not remove bridge & prefix commands

Open Soheab opened this issue 4 months ago • 1 comments

Summary

As the title says, when you unload an extension that includes a cog with prefix or bridge commands, it does not remove those commands. This is similar to #2015, but slash commands do get unloaded now.

Reproduction Steps

  1. Define an extension.
  2. Define a Cog inside it.
  3. Add prefix, bridge, and slash commands inside the Cog.
  4. Load the extension.
  5. Run the commands.
  6. Unload the extension.
  7. Observe the bridge and prefix commands still working fine.

Minimal Reproducible Code

Todo

Expected Results

I expected the bridge and prefix commands to not work anymore, just like the slash commands in the same cog.

Actual Results

The bridge and prefix still function, as if the extension is still loaded.

Intents

Not relevant

System Information

TODO

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

Soheab avatar Oct 22 '25 10:10 Soheab

Can't repro anymore. Need someone else to test it. Context and code in the server: https://discord.com/channels/881207955029110855/881735314987708456/1436390653062811768

Soheab avatar Nov 09 '25 16:11 Soheab