handle slash command errors
@@ -209,6 +209,10 @@ class Events(commands.Cog):
if not isinstance(e.__dict__.get("original"), discord.errors.Forbidden):
await self.debug_error(ctx, e)
+ @commands.Cog.listener()
+ async def on_slash_command_error(self, ctx, e):
+ await self.on_command_error(ctx, e)
+
def setup(bot):
bot.add_cog(Events(bot))
