def edit(self, **kwargs):
payload = {}<EOL>try:<EOL><INDENT>name = kwargs['<STR_LIT:name>']<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if name is not None:<EOL><INDENT>payload['<STR_LIT:name>'] = str(name)<EOL><DEDENT>else:<EOL><INDENT>payload['<STR_LIT:name>'] = None<EOL><DEDENT><DEDENT>try:<EOL><INDENT>avatar = kwargs['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if avatar is not None:<EOL><INDENT>payload['<STR_LIT>'] = utils._bytes_to_base64_data(avatar)<EOL><DEDENT>else:<EOL><INDENT>payload['<STR_LIT>'] = None<EOL><DEDENT><DEDENT>return self._adapter.edit_webhook(**payload)<EOL>
|maybecoro|

        Edits this Webhook.

        If the webhook is constructed with a :class:`RequestsWebhookAdapter` then this is
        not a coroutine.

        Parameters
        -------------
        name: Optional[:class:`str`]
            The webhook's new default name.
        avatar: Optional[:class:`bytes`]
            A :term:`py:bytes-like object` representing the webhook's new default avatar.

        Raises
        -------
        HTTPException
            Editing the webhook failed.
        NotFound
            This webhook does not exist.
        Forbidden
            You do not have permissions to edit this webhook.