Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.48 KB

image.md

File metadata and controls

40 lines (28 loc) · 1.48 KB

AlexFlipnote.py Docs | Models/Image

Image

Represents a class for all image endpoints.

Attributes

  • url str - The URL of the image.

Methods


await read(bytesio: bool = True) -> Union[bytes, io.BytesIO]

Returns the image data. If bytesio is True, it will return a io.BytesIO object. Otherwise, it will return the raw bytes.

Parameters

  • bytesio (bool) - Whether to return the data as a :class:io.BytesIO object. Defaults to True.

await file(cls: FileLike, filename: str = "image.png") -> FileLike:

Converts the image to a file-like object.

Parameters

  • cls (FileLike) - The file-like object to convert the image to. E,g, discord.File (discord.py)
  • filename (str) - The filename to use.