async def clr(self, ctx, member: discord.User, *, amount = 100):
await ctx.message.delete()
await ctx.channel.purge(limit = amount, check = lambda message: message.author == member)
async def remove_messages(ctx, author, count):
total_messages = 0
author_messages = 0
async for message in channel.history(limit=None):
total_messages += 1
if message.author == author:
author_messages += 1
if author_messages == count:
break
await ctx.channel.purge(limit = total_messages, check = lambda message: message.author == member)