<commit_before>import discord
from discord.ext import commands

# TODO: Rate limiting for more user-like deletion

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

    @commands.command(aliases=['flush'])
    async def purge(self, ctx, num_msg: int):
        """ Remove a certain number of your messages """
        def check(message):
            return message.author.id == self.bot.user.id

        try:
            await ctx.channel.purge(check=check, limit=num_msg)
        except Exception as e:
            return await ctx.invoke(bot.get_command('error'), err=e)


def setup(bot):
    bot.add_cog(Purge(bot))
    <commit_msg>P E P 8 M Y D U D E S<commit_after>import discord
from discord.ext import commands

# TODO: Rate limiting for more user-like deletion


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

    @commands.command(aliases=['flush'])
    async def purge(self, ctx, num_msg: int):
        """ Remove a certain number of your messages """
        def check(message):
            return message.author.id == self.bot.user.id

        try:
            await ctx.channel.purge(check=check, limit=num_msg)
        except Exception as e:
            return await ctx.invoke(bot.get_command('error'), err=e)


def setup(bot):
    bot.add_cog(Purge(bot))

{'fraction_non_alphanumeric': 0.1103448275862069, 'fraction_numerical': 0.0007662835249042146, 'mean_word_length': 2.64804469273743, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '450492', 'n_tokens_mistral': 408, 'n_tokens_neox': 391, 'n_words': 118}