async def edit(self, content: Optional[str]=MISSING, embed: Optional[Embed]=MISSING, embeds: Sequence[Embed]=MISSING, attachments: Sequence[Union[(Attachment, File)]]=MISSING, delete_after: Optional[float]=None, allowed_mentions: Optional[AllowedMentions]=MISSING, view: Optional[View]=MISSING) -> Message:
    "|coro|\n\n        Edits the message.\n\n        The content must be able to be transformed into a string via ``str(content)``.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited message is returned instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        content: Optional[:class:`str`]\n            The new content to replace the message with.\n            Could be ``None`` to remove the content.\n        embed: Optional[:class:`Embed`]\n            The new embed to replace the original with.\n            Could be ``None`` to remove the embed.\n        embeds: List[:class:`Embed`]\n            The new embeds to replace the original with. Must be a maximum of 10.\n            To remove all embeds ``[]`` should be passed.\n\n            .. versionadded:: 2.0\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n            .. versionadded:: 2.0\n        delete_after: Optional[:class:`float`]\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just edited. If the deletion fails,\n            then it is silently ignored.\n        allowed_mentions: Optional[:class:`~discord.AllowedMentions`]\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n\n            .. versionadded:: 1.4\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to suppress a message without permissions or\n            edited a message's content or embed that isn't yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n\n        Returns\n        --------\n        :class:`Message`\n            The newly edited message.\n        "
    if (content is not MISSING):
        previous_allowed_mentions = self._state.allowed_mentions
    else:
        previous_allowed_mentions = None
    if (view is not MISSING):
        self._state.prevent_view_updates_for(self.id)
    params = handle_message_parameters(content=content, embed=embed, embeds=embeds, attachments=attachments, view=view, allowed_mentions=allowed_mentions, previous_allowed_mentions=previous_allowed_mentions)
    data = (await self._state.http.edit_message(self.channel.id, self.id, params=params))
    message = Message(state=self._state, channel=self.channel, data=data)
    if (view and (not view.is_finished())):
        self._state.store_view(view, self.id)
    if (delete_after is not None):
        (await self.delete(delay=delete_after))
    return message
|coro|

Edits the message.

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

.. versionchanged:: 2.0
    Edits are no longer in-place, the newly edited message is returned instead.

.. versionchanged:: 2.0
    This function will now raise :exc:`TypeError` instead of
    ``InvalidArgument``.

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.
embeds: List[:class:`Embed`]
    The new embeds to replace the original with. Must be a maximum of 10.
    To remove all embeds ``[]`` should be passed.

    .. versionadded:: 2.0
attachments: List[Union[:class:`Attachment`, :class:`File`]]
    A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed
    then all attachments are removed.

    .. note::

        New files will always appear after current attachments.

    .. versionadded:: 2.0
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.
allowed_mentions: Optional[:class:`~discord.AllowedMentions`]
    Controls the mentions being processed in this message. If this is
    passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.
    The merging behaviour only overrides attributes that have been explicitly passed
    to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.
    If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`
    are used instead.

    .. versionadded:: 1.4
view: Optional[:class:`~discord.ui.View`]
    The updated view to update this message with. If ``None`` is passed then
    the view is removed.

Raises
-------
HTTPException
    Editing the message failed.
Forbidden
    Tried to suppress a message without permissions or
    edited a message's content or embed that isn't yours.
TypeError
    You specified both ``embed`` and ``embeds``

Returns
--------
:class:`Message`
    The newly edited message.
async def edit(self, content: Optional[str]=MISSING, embed: Optional[Embed]=MISSING, embeds: Sequence[Embed]=MISSING, attachments: Sequence[Union[(Attachment, File)]]=MISSING, delete_after: Optional[float]=None, allowed_mentions: Optional[AllowedMentions]=MISSING, view: Optional[View]=MISSING) -> Message:
    "|coro|\n\n        Edits the message.\n\n        The content must be able to be transformed into a string via ``str(content)``.\n\n        .. versionchanged:: 2.0\n            Edits are no longer in-place, the newly edited message is returned instead.\n\n        .. versionchanged:: 2.0\n            This function will now raise :exc:`TypeError` instead of\n            ``InvalidArgument``.\n\n        Parameters\n        -----------\n        content: Optional[:class:`str`]\n            The new content to replace the message with.\n            Could be ``None`` to remove the content.\n        embed: Optional[:class:`Embed`]\n            The new embed to replace the original with.\n            Could be ``None`` to remove the embed.\n        embeds: List[:class:`Embed`]\n            The new embeds to replace the original with. Must be a maximum of 10.\n            To remove all embeds ``[]`` should be passed.\n\n            .. versionadded:: 2.0\n        attachments: List[Union[:class:`Attachment`, :class:`File`]]\n            A list of attachments to keep in the message as well as new files to upload. If ``[]`` is passed\n            then all attachments are removed.\n\n            .. note::\n\n                New files will always appear after current attachments.\n\n            .. versionadded:: 2.0\n        delete_after: Optional[:class:`float`]\n            If provided, the number of seconds to wait in the background\n            before deleting the message we just edited. If the deletion fails,\n            then it is silently ignored.\n        allowed_mentions: Optional[:class:`~discord.AllowedMentions`]\n            Controls the mentions being processed in this message. If this is\n            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.\n            The merging behaviour only overrides attributes that have been explicitly passed\n            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.\n            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`\n            are used instead.\n\n            .. versionadded:: 1.4\n        view: Optional[:class:`~discord.ui.View`]\n            The updated view to update this message with. If ``None`` is passed then\n            the view is removed.\n\n        Raises\n        -------\n        HTTPException\n            Editing the message failed.\n        Forbidden\n            Tried to suppress a message without permissions or\n            edited a message's content or embed that isn't yours.\n        TypeError\n            You specified both ``embed`` and ``embeds``\n\n        Returns\n        --------\n        :class:`Message`\n            The newly edited message.\n        "
    if (content is not MISSING):
        previous_allowed_mentions = self._state.allowed_mentions
    else:
        previous_allowed_mentions = None
    if (view is not MISSING):
        self._state.prevent_view_updates_for(self.id)
    params = handle_message_parameters(content=content, embed=embed, embeds=embeds, attachments=attachments, view=view, allowed_mentions=allowed_mentions, previous_allowed_mentions=previous_allowed_mentions)
    data = (await self._state.http.edit_message(self.channel.id, self.id, params=params))
    message = Message(state=self._state, channel=self.channel, data=data)
    if (view and (not view.is_finished())):
        self._state.store_view(view, self.id)
    if (delete_after is not None):
        (await self.delete(delay=delete_after))
    return message