pycord
pycord copied to clipboard
Unloading an extension does not remove bridge & prefix commands
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
- Define an extension.
- Define a Cog inside it.
- Add prefix, bridge, and slash commands inside the Cog.
- Load the extension.
- Run the commands.
- Unload the extension.
- 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
Can't repro anymore. Need someone else to test it. Context and code in the server: https://discord.com/channels/881207955029110855/881735314987708456/1436390653062811768