async def edit(self, **fields):
try:<EOL><INDENT>content = fields['<STR_LIT:content>']<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if content is not None:<EOL><INDENT>fields['<STR_LIT:content>'] = str(content)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>embed = fields['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if embed is not None:<EOL><INDENT>fields['<STR_LIT>'] = embed.to_dict()<EOL><DEDENT><DEDENT>data = await self._state.http.edit_message(self.channel.id, self.id, **fields)<EOL>self._update(channel=self.channel, data=data)<EOL>try:<EOL><INDENT>delete_after = fields['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if delete_after is not None:<EOL><INDENT>await self.delete(delay=delete_after)<EOL><DEDENT><DEDENT>
|coro|

        Edits the message.

        The content must be able to be transformed into a string via ``str(content)``.

        Parameters
        -----------
        content: Optional[:class:`str`]
            The new content to replace the message with.
            Could be ``None`` to remove the content.
        embed: Optional[:class:`Embed`]
            The new embed to replace the original with.
            Could be ``None`` to remove the embed.
        delete_after: Optional[:class:`float`]
            If provided, the number of seconds to wait in the background
            before deleting the message we just edited. If the deletion fails,
            then it is silently ignored.

        Raises
        -------
        HTTPException
            Editing the message failed.