Closed
Description
Summary
Slash commands should be unregistered when the bot closes, and re-registers when the bot is on
Reproduction Steps
- Make a slash command
- Close the bot
- The slash command still remains, but not working, as it should not be
Minimal Reproducible Code
@bot.slash_command(...)
async def slash_command(ctx):
...
bot.run() # start the bot
# close the bot
# slash_command is still there but not working
Expected Results
Slash command should be removed when the bot closes or when its code gets removed
Actual Results
The slash command still remains, even if you close the bot, or remove the code
Intents
discord.Intents.all()
System Information
- Python v3.8.0-final
- py-cord v2.0.0-alpha
- py-cord pkg_resources: v2.0.0a4448+ge00b272d
- aiohttp v3.8.1
- system info: Linux 3.10.72 Update README.rst #1 SMP PREEMPT Mon Mar 27 10:50:45 CST 2017
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
As What should have been done, all slash commands in a bot should be unregistered in