The error isn't being caught, not sure what im doing wrong here.
@Cog.listener()
async def on_slash_command_error(self, inter: disnake.ApplicationCommandInteraction, error):
if isinstance(error, errors.CommandOnCooldown):
num = round(error.retry_after, 0)
await inter.edit_original_message(
f"This command is on cooldown. Try again in {num} seconds.",
)
elif isinstance(error, disnake.HTTPException):
await inter.edit_original_message(
"That vanity is either invalid or taken.",
)
