async def delete(self, *, delay=None):
if delay is not None:<EOL><INDENT>async def delete():<EOL><INDENT>await asyncio.sleep(delay, loop=self._state.loop)<EOL>try:<EOL><INDENT>await self._state.http.delete_message(self.channel.id, self.id)<EOL><DEDENT>except HTTPException:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>asyncio.ensure_future(delete(), loop=self._state.loop)<EOL><DEDENT>else:<EOL><INDENT>await self._state.http.delete_message(self.channel.id, self.id)<EOL><DEDENT>
|coro|

        Deletes the message.

        Your own messages could be deleted without any proper permissions. However to
        delete other people's messages, you need the :attr:`~Permissions.manage_messages`
        permission.

        .. versionchanged:: 1.1.0
            Added the new ``delay`` keyword-only parameter.

        Parameters
        -----------
        delay: Optional[:class:`float`]
            If provided, the number of seconds to wait in the background
            before deleting the message.

        Raises
        ------
        Forbidden
            You do not have proper permissions to delete the message.
        HTTPException
            Deleting the message failed.