Skip to content

Commit

Permalink
catch errors properly
Browse files Browse the repository at this point in the history
  • Loading branch information
eibex authored Feb 18, 2024
1 parent 47c948c commit 3e15cf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cogs/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def __init__(self, bot):

@commands.Cog.listener()
async def on_slash_command_error(self, inter, error):
if isinstance(error, commands.NotOwner):
if isinstance(error, commands.errors.NotOwner):
await inter.send(self.bot.response.get("not-owner", guild_id=inter.guild.id))
elif isinstance(error, commands.NoPrivateMessage):
elif isinstance(error, commands.errors.NoPrivateMessage):
await inter.send(self.bot.response.get("no-dm"))
else:
traceback.print_tb(error.__traceback__)
Expand Down

0 comments on commit 3e15cf8

Please sign in to comment.