from discord import ApplicationContext, DiscordException from discord.ext.commands import Cog class CUtil(Cog): def __init__(self, bot): self.bot = bot @Cog.listener() async def on_application_command_error(ctx: ApplicationContext, exception: DiscordException) -> None: pass def setup(bot): bot.add_cog(CUtil(bot))