async def edit(self, *, reason=None, **fields):
position = fields.get('<STR_LIT>')<EOL>if position is not None:<EOL><INDENT>await self._move(position, reason=reason)<EOL>self.position = position<EOL><DEDENT>try:<EOL><INDENT>colour = fields['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>colour = fields.get('<STR_LIT>', self.colour)<EOL><DEDENT>payload = {<EOL>'<STR_LIT:name>': fields.get('<STR_LIT:name>', self.name),<EOL>'<STR_LIT>': fields.get('<STR_LIT>', self.permissions).value,<EOL>'<STR_LIT>': colour.value,<EOL>'<STR_LIT>': fields.get('<STR_LIT>', self.hoist),<EOL>'<STR_LIT>': fields.get('<STR_LIT>', self.mentionable)<EOL>}<EOL>data = await self._state.http.edit_role(self.guild.id, self.id, reason=reason, **payload)<EOL>self._update(data)<EOL>
|coro|

        Edits the role.

        You must have the :attr:`~Permissions.manage_roles` permission to
        use this.

        All fields are optional.

        Parameters
        -----------
        name: :class:`str`
            The new role name to change to.
        permissions: :class:`Permissions`
            The new permissions to change to.
        colour: :class:`Colour`
            The new colour to change to. (aliased to color as well)
        hoist: :class:`bool`
            Indicates if the role should be shown separately in the member list.
        mentionable: :class:`bool`
            Indicates if the role should be mentionable by others.
        position: :class:`int`
            The new role's position. This must be below your top role's
            position or it will fail.
        reason: Optional[:class:`str`]
            The reason for editing this role. Shows up on the audit log.

        Raises
        -------
        Forbidden
            You do not have permissions to change the role.
        HTTPException
            Editing the role failed.
        InvalidArgument
            An invalid position was given or the default
            role was asked to be moved.