Skip to content

Commit e9b1401

Browse files
fix: Duplicate "Command not found" errors
1 parent 0648edb commit e9b1401

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/gitcord/cogs/general.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,15 +1308,6 @@ async def help_slash(self, interaction: discord.Interaction) -> None:
13081308

13091309
await interaction.response.send_message(embed=embed)
13101310

1311-
@commands.Cog.listener()
1312-
async def on_command_error(self, ctx: commands.Context, error: commands.CommandError) -> None:
1313-
"""Handle command errors."""
1314-
if isinstance(error, commands.CommandNotFound):
1315-
await ctx.send("Command not found. Try `!help` or `!ping`!")
1316-
else:
1317-
logger.error("Command error in %s: %s", ctx.command, error)
1318-
await ctx.send(f"An error occurred: {error}")
1319-
13201311

13211312
async def setup(bot: commands.Bot) -> None:
13221313
"""Set up the General cog."""

0 commit comments

Comments
 (0)