I am creating a command for my discord bot and simply need to find some code that can handle the above error, as it is of no concern for this section of code, and I just want to simply log it.
I have tried the below, and was expecting for the error to no longer show in the terminal
@client.event
async def on_tree_error(interaction: discord.Interaction, error: discord.app_commands.AppCommandError):
if isinstance(error, discord.errors.HTTPException):
return await interaction.response.is_done()
else:
raise error
New contributor
Cameron Edens is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.