This short example will cover how to make slash commands within an ext.commands.Bot's extension and Cog ecosystem.
This will cover most slash situations within discord.py
I added how this command would be invoked in the doc strings.
This does not account for the fact you still need to sync Bot.tree somewhere, please remember to do this.