Repository: Rapptz/discord.py
File: discord/role.py (Python)

Code before:
            an offset of ``2`` with ``beginning=True`` would move
            it 2 above the beginning. A positive number moves it above
            while a negative number moves it below. Note that this
            number is relative and computed after the ``beginning``,
            ``end``, ``before``, and ``after`` parameters.
        reason: Optional[:class:`str`]
            The reason for editing this role. Shows up on the audit log.

        Raises
        -------
        Forbidden
            You cannot move the role there, or lack permissions to do so.
        HTTPException
            Moving the role failed.
        TypeError
            A bad mix of arguments were passed.
        ValueError
            An invalid role was passed.

        Returns
        --------
        List[:class:`Role`]
            A list of all the roles in the guild.
        """
        if sum(bool(a) for a in (beginning, end, above, below)) > 1:
            raise TypeError('Only one of [above, below, end, end] can be used.')

        target = above or below
        guild = self.guild
        guild_roles = guild.roles

        if target:
            if target not in guild_roles:
                raise ValueError("Target role is from a different guild")
            if above == guild.default_role:
                raise ValueError("Role cannot be moved below the default role")
            if self == target:
                raise ValueError("Target role cannot be itself")

        roles = [r for r in guild_roles if r != self]
        if beginning:
            index = 1
        elif end:
            index = len(roles)
        elif above in roles:
            index = roles.index(above)
        elif below in roles:
            index = roles.index(below) + 1
        else:
            index = guild_roles.index(self)
        roles.insert(max((index + offset), 1), self)

Review comment (suggestion):
```suggestion
            raise TypeError('Only one of [above, below, beginning, end] can be used.')
```

Code after:
            The role that should be below our current role.
            This mutually exclusive with `beginning`, `end`, and `above`.
        offset: :class:`int`
            The number of roles to offset the move by. For example,
            an offset of ``2`` with ``beginning=True`` would move
            it 2 above the beginning. A positive number moves it above
            while a negative number moves it below. Note that this
            number is relative and computed after the ``beginning``,
            ``end``, ``before``, and ``after`` parameters.
        reason: Optional[:class:`str`]
            The reason for editing this role. Shows up on the audit log.

        Raises
        -------
        Forbidden
            You cannot move the role there, or lack permissions to do so.
        HTTPException
            Moving the role failed.
        TypeError
            A bad mix of arguments were passed.
        ValueError
            An invalid role was passed.

        Returns
        --------
        List[:class:`Role`]
            A list of all the roles in the guild.
        """
        if sum(bool(a) for a in (beginning, end, above, below)) > 1:
            raise TypeError('Only one of [beginning, end, above, below] can be used.')

        target = above or below
        guild = self.guild
        guild_roles = guild.roles

        if target:
            if target not in guild_roles:
                raise ValueError('Target role is from a different guild')
            if above == guild.default_role:
                raise ValueError('Role cannot be moved below the default role')
            if self == target:
                raise ValueError('Target role cannot be itself')

        roles = [r for r in guild_roles if r != self]
        if beginning:
            index = 1
        elif end:
            index = len(roles)
        elif above in roles:
            index = roles.index(above)
        elif below in roles: