Represents a class for all image endpoints.
- url str - The URL of the image.
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.
- bytesio (bool) - Whether to return the data as a :class:
io.BytesIO
object. Defaults toTrue
.
await file(cls: FileLike
, filename: str = "image.png"
) -> FileLike
:
Converts the image to a file-like object.
- cls (
FileLike
) - The file-like object to convert the image to. E,g,discord.File
(discord.py) - filename (str) - The filename to use.