<commit_before>import discord
from discord.ext import commands

class ErrorFormatter:
    def __init__(self, bot):
        self.bot = bot

    @commands.command(name='error', hidden=True)
    async def error_formatter(self, ctx, *, err: str):
        """ Send a nice embed error with a message

        Usage:
        class Foo:
            def __init__(self, bot):
                self.bot = bot
                self.cmd = bot.get_command('error')

        @commands.command()
        async def bar(self, ctx, *, baz):
            # some error happened
            await ctx.invoke(cmd, err='error message here')
        """
        em = discord.Embed(title=':x: Error', color=discord.Color.dark_red(), description=err)
        await ctx.send(embed=em)


def setup(bot):
    bot.add_cog(ErrorFormatter(bot))<commit_msg>delete errors after 10 seconds<commit_after>import discord
from discord.ext import commands

class ErrorFormatter:
    def __init__(self, bot):
        self.bot = bot

    @commands.command(name='error', hidden=True)
    async def error_formatter(self, ctx, *, err: str):
        """ Send a nice embed error with a message

        Usage:
        class Foo:
            def __init__(self, bot):
                self.bot = bot
                self.cmd = bot.get_command('error')

        @commands.command()
        async def bar(self, ctx, *, baz):
            # some error happened
            await ctx.invoke(cmd, err='error message here')
        """
        em = discord.Embed(title=':x: Error', color=discord.Color.dark_red(), description=err)
        await ctx.send(embed=em, delete_after=10.0)


def setup(bot):
    bot.add_cog(ErrorFormatter(bot))
{'fraction_non_alphanumeric': 0.1175417661097852, 'fraction_numerical': 0.0029832935560859188, 'mean_word_length': 2.3607214428857715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3654812', 'n_tokens_mistral': 502, 'n_tokens_neox': 476, 'n_words': 130}