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)