# Buggy code
async def user(
    self, ctx: commands.Context, user: str, number: int, delete_pinned: bool = False
):
    """Delete the last X messages from a specified user.

    Examples:
        `[p]cleanup user @\u200bTwentysix 2`
        `[p]cleanup user Red 6`
    """
    channel = ctx.channel

    member = None
    try:
        member = await commands.converter.MemberConverter().convert(ctx, user)
    except commands.BadArgument:
        try:
            _id = int(user)
        except ValueError:
            raise commands.BadArgument()
    else:
        _id = member.id

    author = ctx.author

    if number > 100:
        cont = await self.check_100_plus(ctx, number)
        if not cont:
            return

    def check(m):
        if m.author.id == _id:
            return True
        elif m == ctx.message:
            return True
        else:
            return False

    to_delete = await self.get_messages_for_deletion(
        channel=channel,
        number=number,
        check=check,
        before=ctx.message,
        delete_pinned=delete_pinned,
    )
    reason = "{}({}) deleted {} messages  made by {}({}) in channel {}.".format(
        author.name, author.id, len(to_delete), member or "???", _id, channel.name
    )
    log.info(reason)

    await mass_purge(to_delete, channel)


# Traceback (AttributeError)
[11/10/2018 11:04] ERROR events on_command_error 208: Exception in command 'cleanup user'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 61, in wrapped
ret = await coro(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/redbot/cogs/cleanup/cleanup.py", line 172, in user
member = await commands.converter.MemberConverter().convert(ctx, user)
AttributeError: module 'redbot.core.commands.converter' has no attribute 'MemberConverter'
[11/10/2018 11:04] ERROR events on_command_error 213: Exception in command 'cleanup user'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 61, in wrapped
ret = await coro(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/redbot/cogs/cleanup/cleanup.py", line 172, in user
member = await commands.converter.MemberConverter().convert(ctx, user)
AttributeError: module 'redbot.core.commands.converter' has no attribute 'MemberConverter'

# Fixed code
async def user(
    self, ctx: commands.Context, user: str, number: int, delete_pinned: bool = False
):
    """Delete the last X messages from a specified user.

    Examples:
        `[p]cleanup user @\u200bTwentysix 2`
        `[p]cleanup user Red 6`
    """
    channel = ctx.channel

    member = None
    try:
        member = await commands.MemberConverter().convert(ctx, user)
    except commands.BadArgument:
        try:
            _id = int(user)
        except ValueError:
            raise commands.BadArgument()
    else:
        _id = member.id

    author = ctx.author

    if number > 100:
        cont = await self.check_100_plus(ctx, number)
        if not cont:
            return

    def check(m):
        if m.author.id == _id:
            return True
        elif m == ctx.message:
            return True
        else:
            return False

    to_delete = await self.get_messages_for_deletion(
        channel=channel,
        number=number,
        check=check,
        before=ctx.message,
        delete_pinned=delete_pinned,
    )
    reason = "{}({}) deleted {} messages  made by {}({}) in channel {}.".format(
        author.name, author.id, len(to_delete), member or "???", _id, channel.name
    )
    log.info(reason)

    await mass_purge(to_delete, channel)