async def save(self, fp: Union[(io.BufferedIOBase, PathLike[Any])], *, seek_begin: bool=True, use_cached: bool=False) -> int:
    '|coro|\n\n        Saves this attachment into a file-like object.\n\n        Parameters\n        -----------\n        fp: Union[:class:`io.BufferedIOBase`, :class:`os.PathLike`]\n            The file-like object to save this attachment to or the filename\n            to use. If a filename is passed then a file is created with that\n            filename and used instead.\n        seek_begin: :class:`bool`\n            Whether to seek to the beginning of the file after saving is\n            successfully done.\n        use_cached: :class:`bool`\n            Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading\n            the attachment. This will allow attachments to be saved after deletion\n            more often, compared to the regular URL which is generally deleted right\n            after the message is deleted. Note that this can still fail to download\n            deleted attachments if too much time has passed and it does not work\n            on some types of attachments.\n\n        Raises\n        --------\n        HTTPException\n            Saving the attachment failed.\n        NotFound\n            The attachment was deleted.\n\n        Returns\n        --------\n        :class:`int`\n            The number of bytes written.\n        '
    data = (await self.read(use_cached=use_cached))
    if isinstance(fp, io.BufferedIOBase):
        written = fp.write(data)
        if seek_begin:
            fp.seek(0)
        return written
    else:
        with open(fp, 'wb') as f:
            return f.write(data)
|coro|

Saves this attachment into a file-like object.

Parameters
-----------
fp: Union[:class:`io.BufferedIOBase`, :class:`os.PathLike`]
    The file-like object to save this attachment to or the filename
    to use. If a filename is passed then a file is created with that
    filename and used instead.
seek_begin: :class:`bool`
    Whether to seek to the beginning of the file after saving is
    successfully done.
use_cached: :class:`bool`
    Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading
    the attachment. This will allow attachments to be saved after deletion
    more often, compared to the regular URL which is generally deleted right
    after the message is deleted. Note that this can still fail to download
    deleted attachments if too much time has passed and it does not work
    on some types of attachments.

Raises
--------
HTTPException
    Saving the attachment failed.
NotFound
    The attachment was deleted.

Returns
--------
:class:`int`
    The number of bytes written.
async def save(self, fp: Union[(io.BufferedIOBase, PathLike[Any])], *, seek_begin: bool=True, use_cached: bool=False) -> int:
    '|coro|\n\n        Saves this attachment into a file-like object.\n\n        Parameters\n        -----------\n        fp: Union[:class:`io.BufferedIOBase`, :class:`os.PathLike`]\n            The file-like object to save this attachment to or the filename\n            to use. If a filename is passed then a file is created with that\n            filename and used instead.\n        seek_begin: :class:`bool`\n            Whether to seek to the beginning of the file after saving is\n            successfully done.\n        use_cached: :class:`bool`\n            Whether to use :attr:`proxy_url` rather than :attr:`url` when downloading\n            the attachment. This will allow attachments to be saved after deletion\n            more often, compared to the regular URL which is generally deleted right\n            after the message is deleted. Note that this can still fail to download\n            deleted attachments if too much time has passed and it does not work\n            on some types of attachments.\n\n        Raises\n        --------\n        HTTPException\n            Saving the attachment failed.\n        NotFound\n            The attachment was deleted.\n\n        Returns\n        --------\n        :class:`int`\n            The number of bytes written.\n        '
    data = (await self.read(use_cached=use_cached))
    if isinstance(fp, io.BufferedIOBase):
        written = fp.write(data)
        if seek_begin:
            fp.seek(0)
        return written
    else:
        with open(fp, 'wb') as f:
            return f.write(data)